mirror of
https://github.com/reactos/reactos.git
synced 2025-05-29 05:58:13 +00:00
[CMAKE]
- rework set_cpp to allow fine-grained control over enabled language features CORE-6950 svn path=/trunk/; revision=59288
This commit is contained in:
parent
020944a4bd
commit
d8b4a7bd9e
31 changed files with 218 additions and 232 deletions
|
@ -1,4 +1,6 @@
|
||||||
|
|
||||||
set_cpp()
|
set_cpp()
|
||||||
|
|
||||||
add_definitions(-DUSER_MODE)
|
add_definitions(-DUSER_MODE)
|
||||||
include_directories(${REACTOS_SOURCE_DIR}/drivers/storage/ide/uniata)
|
include_directories(${REACTOS_SOURCE_DIR}/drivers/storage/ide/uniata)
|
||||||
add_executable(atactl atactl.cpp atactl.rc)
|
add_executable(atactl atactl.cpp atactl.rc)
|
||||||
|
@ -9,7 +11,6 @@ if(NOT MSVC)
|
||||||
# FIXME: http://www.cmake.org/Bug/view.php?id=12998
|
# FIXME: http://www.cmake.org/Bug/view.php?id=12998
|
||||||
#allow_warnings(atactl)
|
#allow_warnings(atactl)
|
||||||
set_source_files_properties(atactl.cpp PROPERTIES COMPILE_FLAGS "-Wno-error")
|
set_source_files_properties(atactl.cpp PROPERTIES COMPILE_FLAGS "-Wno-error")
|
||||||
target_link_libraries(atactl gcc)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_cd_file(TARGET atactl DESTINATION reactos/system32 FOR all)
|
add_cd_file(TARGET atactl DESTINATION reactos/system32 FOR all)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
|
|
||||||
set_cpp()
|
set_cpp(WITH_RUNTIME)
|
||||||
|
|
||||||
include_directories(${REACTOS_SOURCE_DIR}/lib/3rdparty/cardlib)
|
include_directories(${REACTOS_SOURCE_DIR}/lib/3rdparty/cardlib)
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,9 @@
|
||||||
|
|
||||||
set_cpp()
|
set_cpp(WITH_RUNTIME)
|
||||||
|
|
||||||
include_directories(${REACTOS_SOURCE_DIR}/lib/3rdparty/cardlib ${CMAKE_CURRENT_SOURCE_DIR})
|
include_directories(
|
||||||
|
${REACTOS_SOURCE_DIR}/lib/3rdparty/cardlib
|
||||||
|
${CMAKE_CURRENT_SOURCE_DIR})
|
||||||
|
|
||||||
add_executable(spider
|
add_executable(spider
|
||||||
spider.cpp
|
spider.cpp
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
|
|
||||||
|
set_cpp(WITH_STL)
|
||||||
|
|
||||||
add_definitions(-D_CRT_NONSTDC_NO_DEPRECATE)
|
add_definitions(-D_CRT_NONSTDC_NO_DEPRECATE)
|
||||||
|
|
||||||
set_cpp()
|
|
||||||
|
|
||||||
add_executable(telnet
|
add_executable(telnet
|
||||||
src/ansiprsr.cpp
|
src/ansiprsr.cpp
|
||||||
src/keytrans.cpp
|
src/keytrans.cpp
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
|
|
||||||
set_cpp()
|
set_cpp(WITH_RUNTIME)
|
||||||
|
|
||||||
add_executable(sndrec32
|
add_executable(sndrec32
|
||||||
audio_format.cpp
|
audio_format.cpp
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
|
|
||||||
add_subdirectory(notifyhook)
|
add_subdirectory(notifyhook)
|
||||||
|
|
||||||
set_cpp()
|
set_cpp(WITH_RTTI WITH_EXCEPTIONS WITH_STL)
|
||||||
|
|
||||||
add_definitions(
|
add_definitions(
|
||||||
-DWIN32
|
-DWIN32
|
||||||
|
|
|
@ -1,9 +1,81 @@
|
||||||
|
|
||||||
|
# set_cpp
|
||||||
|
# Marks the current folder as containing C++ modules, additionally enabling
|
||||||
|
# specific C++ language features as specified (all of these default to off):
|
||||||
|
#
|
||||||
|
# WITH_RUNTIME
|
||||||
|
# Links with the C++ runtime. Enable this for modules which use new/delete or
|
||||||
|
# RTTI, but do not require STL. This is the right choice if you see undefined
|
||||||
|
# references to operator new/delete, vector constructor/destructor iterator,
|
||||||
|
# type_info::vtable, ...
|
||||||
|
# Note: this only affects linking, so cannot be used for static libraries.
|
||||||
|
# WITH_RTTI
|
||||||
|
# Enables run-time type information. Enable this if the module uses typeid or
|
||||||
|
# dynamic_cast. You will probably need to enable WITH_RUNTIME as well, if
|
||||||
|
# you're not already using STL.
|
||||||
|
# WITH_EXCEPTIONS
|
||||||
|
# Enables C++ exception handling. Enable this if the module uses try/catch or
|
||||||
|
# throw. You might also need this if you use a standard operator new (the one
|
||||||
|
# without nothrow).
|
||||||
|
# WITH_STL
|
||||||
|
# Enables standard C++ headers and links to the Standard Template Library.
|
||||||
|
# Use this for modules using anything from the std:: namespace, e.g. maps,
|
||||||
|
# strings, vectors, etc.
|
||||||
|
# Note: this affects both compiling (via include directories) and
|
||||||
|
# linking (by adding STL). Implies WITH_RUNTIME.
|
||||||
|
# FIXME: WITH_STL is currently also required for runtime headers such as
|
||||||
|
# <new> and <exception>. This is not a big issue because in stl-less
|
||||||
|
# environments you usually don't want those anyway; but we might want
|
||||||
|
# to have modules like this in the future.
|
||||||
|
#
|
||||||
|
# Examples:
|
||||||
|
# set_cpp()
|
||||||
|
# Enables the C++ language, but will cause errors if any runtime or standard
|
||||||
|
# library features are used. This should be the default for C++ in kernel
|
||||||
|
# mode or otherwise restricted environments.
|
||||||
|
# Note: this is required to get libgcc (for multiplication/division) linked
|
||||||
|
# in for C++ modules, and to set the correct language for precompiled
|
||||||
|
# header files, so it IS required even with no features specified.
|
||||||
|
# set_cpp(WITH_RUNTIME)
|
||||||
|
# Links with the C++ runtime, so that e.g. custom operator new implementations
|
||||||
|
# can be used in a restricted environment. This is also required for linking
|
||||||
|
# with libraries (such as ATL) which have RTTI enabled, even if the module in
|
||||||
|
# question does not use WITH_RTTI.
|
||||||
|
# set_cpp(WITH_RTTI WITH_EXCEPTIONS WITH_STL)
|
||||||
|
# The full package. This will adjust compiler and linker so that all C++
|
||||||
|
# features can be used.
|
||||||
macro(set_cpp)
|
macro(set_cpp)
|
||||||
set(IS_CPP 1)
|
cmake_parse_arguments(__cppopts "WITH_RUNTIME;WITH_RTTI;WITH_EXCEPTIONS;WITH_STL" "" "" ${ARGN})
|
||||||
if(MSVC)
|
if(__cppopts_UNPARSED_ARGUMENTS)
|
||||||
include_directories(${REACTOS_SOURCE_DIR}/include/c++)
|
message(FATAL_ERROR "set_cpp: unparsed arguments ${__cppopts_UNPARSED_ARGUMENTS}")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(__cppopts_WITH_RUNTIME)
|
||||||
|
set(CPP_USE_RT 1)
|
||||||
|
endif()
|
||||||
|
if(__cppopts_WITH_RTTI)
|
||||||
|
if(MSVC)
|
||||||
|
replace_compile_flags("/GR-" "/GR")
|
||||||
|
else()
|
||||||
|
replace_compile_flags_language("-fno-rtti" "-frtti" "CXX")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
if(__cppopts_WITH_EXCEPTIONS)
|
||||||
|
if(MSVC)
|
||||||
|
replace_compile_flags("/EHs-c-" "/EHsc")
|
||||||
|
else()
|
||||||
|
replace_compile_flags_language("-fno-exceptions" "-fexceptions" "CXX")
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
if(__cppopts_WITH_STL)
|
||||||
|
set(CPP_USE_STL 1)
|
||||||
|
if(MSVC)
|
||||||
|
add_definitions(-DNATIVE_CPP_INCLUDE=${REACTOS_SOURCE_DIR}/include/c++)
|
||||||
|
include_directories(${REACTOS_SOURCE_DIR}/include/c++/stlport)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set(IS_CPP 1)
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
||||||
function(add_dependency_node _node)
|
function(add_dependency_node _node)
|
||||||
|
|
|
@ -15,6 +15,8 @@ if(GCC_VERSION VERSION_GREATER 4.7)
|
||||||
add_compile_flags("-mstackrealign")
|
add_compile_flags("-mstackrealign")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
add_compile_flags_language("-fno-rtti -fno-exceptions" "CXX")
|
||||||
|
|
||||||
#bug
|
#bug
|
||||||
#file(TO_NATIVE_PATH ${REACTOS_SOURCE_DIR} REACTOS_SOURCE_DIR_NATIVE)
|
#file(TO_NATIVE_PATH ${REACTOS_SOURCE_DIR} REACTOS_SOURCE_DIR_NATIVE)
|
||||||
#workaround
|
#workaround
|
||||||
|
@ -190,12 +192,15 @@ function(set_image_base MODULE IMAGE_BASE)
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
function(set_module_type_toolchain MODULE TYPE)
|
function(set_module_type_toolchain MODULE TYPE)
|
||||||
if(IS_CPP)
|
if(CPP_USE_STL)
|
||||||
if((${TYPE} STREQUAL "kernelmodedriver") OR (${TYPE} STREQUAL "wdmdriver"))
|
if((${TYPE} STREQUAL "kernelmodedriver") OR (${TYPE} STREQUAL "wdmdriver"))
|
||||||
target_link_libraries(${MODULE} -lgcc)
|
message(FATAL_ERROR "Use of STL in kernelmodedriver or wdmdriver type module prohibited")
|
||||||
else()
|
|
||||||
target_link_libraries(${MODULE} -lstdc++ -lsupc++ -lgcc -lmingwex)
|
|
||||||
endif()
|
endif()
|
||||||
|
target_link_libraries(${MODULE} -lstdc++ -lsupc++ -lgcc -lmingwex)
|
||||||
|
elseif(CPP_USE_RT)
|
||||||
|
target_link_libraries(${MODULE} -lsupc++ -lgcc)
|
||||||
|
elseif(IS_CPP)
|
||||||
|
target_link_libraries(${MODULE} -lgcc)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if((${TYPE} STREQUAL "kernelmodedriver") OR (${TYPE} STREQUAL "wdmdriver"))
|
if((${TYPE} STREQUAL "kernelmodedriver") OR (${TYPE} STREQUAL "wdmdriver"))
|
||||||
|
|
|
@ -20,7 +20,7 @@ endif()
|
||||||
|
|
||||||
add_definitions(/Dinline=__inline /D__STDC__=1)
|
add_definitions(/Dinline=__inline /D__STDC__=1)
|
||||||
|
|
||||||
add_compile_flags("/X /GR- /GS- /Zl /W3")
|
add_compile_flags("/X /GR- /EHs-c- /GS- /Zl /W3")
|
||||||
|
|
||||||
# HACK: for VS 11+ we need to explicitly disable SSE, which is off by
|
# HACK: for VS 11+ we need to explicitly disable SSE, which is off by
|
||||||
# default for older compilers. See bug #7174
|
# default for older compilers. See bug #7174
|
||||||
|
@ -108,6 +108,12 @@ function(set_image_base MODULE IMAGE_BASE)
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
function(set_module_type_toolchain MODULE TYPE)
|
function(set_module_type_toolchain MODULE TYPE)
|
||||||
|
if(CPP_USE_STL)
|
||||||
|
if((${TYPE} STREQUAL "kernelmodedriver") OR (${TYPE} STREQUAL "wdmdriver"))
|
||||||
|
message(FATAL_ERROR "Use of STL in kernelmodedriver or wdmdriver type module prohibited")
|
||||||
|
endif()
|
||||||
|
#target_link_libraries(${MODULE} stlport oldnames)
|
||||||
|
endif()
|
||||||
if((${TYPE} STREQUAL "win32dll") OR (${TYPE} STREQUAL "win32ocx") OR (${TYPE} STREQUAL "cpl"))
|
if((${TYPE} STREQUAL "win32dll") OR (${TYPE} STREQUAL "win32ocx") OR (${TYPE} STREQUAL "cpl"))
|
||||||
add_target_link_flags(${MODULE} "/DLL")
|
add_target_link_flags(${MODULE} "/DLL")
|
||||||
elseif(${TYPE} STREQUAL "kernelmodedriver")
|
elseif(${TYPE} STREQUAL "kernelmodedriver")
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
|
|
||||||
set_cpp()
|
set_cpp(WITH_STL)
|
||||||
|
|
||||||
spec2def(ksproxy.ax ksproxy.spec)
|
spec2def(ksproxy.ax ksproxy.spec)
|
||||||
|
|
||||||
|
@ -27,14 +27,6 @@ add_library(ksproxy SHARED ${SOURCE} ksproxy.rc)
|
||||||
set_module_type(ksproxy win32dll)
|
set_module_type(ksproxy win32dll)
|
||||||
set_target_properties(ksproxy PROPERTIES SUFFIX ".ax")
|
set_target_properties(ksproxy PROPERTIES SUFFIX ".ax")
|
||||||
|
|
||||||
if(MSVC)
|
|
||||||
add_target_compile_flags(ksproxy "/GR-")
|
|
||||||
else()
|
|
||||||
# FIXME: http://www.cmake.org/Bug/view.php?id=12998
|
|
||||||
#add_target_compile_flags(ksproxy "-fno-exceptions -fno-rtti")
|
|
||||||
set_source_files_properties(${SOURCE} PROPERTIES COMPILE_FLAGS "-fno-exceptions -fno-rtti")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
target_link_libraries(ksproxy strmiids)
|
target_link_libraries(ksproxy strmiids)
|
||||||
add_importlibs(ksproxy advapi32 ole32 setupapi ksuser msvcrt kernel32 ntdll)
|
add_importlibs(ksproxy advapi32 ole32 setupapi ksuser msvcrt kernel32 ntdll)
|
||||||
add_dependencies(ksproxy dxsdk)
|
add_dependencies(ksproxy dxsdk)
|
||||||
|
|
|
@ -1,21 +1,18 @@
|
||||||
|
|
||||||
|
set_cpp(WITH_RUNTIME)
|
||||||
|
|
||||||
include_directories(BEFORE
|
include_directories(BEFORE
|
||||||
include
|
include
|
||||||
src/include
|
src/include
|
||||||
src/libnurbs/internals
|
src/libnurbs/internals
|
||||||
src/libnurbs/interface
|
src/libnurbs/interface
|
||||||
src/libnurbs/nurbtess
|
src/libnurbs/nurbtess)
|
||||||
)
|
|
||||||
|
|
||||||
add_definitions(
|
add_definitions(
|
||||||
-DBUILD_GLU32
|
-DBUILD_GLU32
|
||||||
-DNDEBUG
|
-DNDEBUG
|
||||||
-DLIBRARYBUILD
|
-DLIBRARYBUILD
|
||||||
-DRESOLVE_3D_TEXTURE_SUPPORT
|
-DRESOLVE_3D_TEXTURE_SUPPORT)
|
||||||
)
|
|
||||||
|
|
||||||
#this library uses C++
|
|
||||||
# set_cpp()
|
|
||||||
|
|
||||||
# we must use our own spec file
|
# we must use our own spec file
|
||||||
spec2def(glu32.dll glu32.spec ADD_IMPORTLIB)
|
spec2def(glu32.dll glu32.spec ADD_IMPORTLIB)
|
||||||
|
@ -117,8 +114,6 @@ add_library(glu32 SHARED ${SOURCE})
|
||||||
set_module_type(glu32 win32dll)
|
set_module_type(glu32 win32dll)
|
||||||
|
|
||||||
if(NOT MSVC)
|
if(NOT MSVC)
|
||||||
#FIXME: we really need a standard C++ library
|
|
||||||
target_link_libraries(glu32 -lsupc++ -lgcc)
|
|
||||||
add_compile_flags("-Wno-error=write-strings")
|
add_compile_flags("-Wno-error=write-strings")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,9 @@
|
||||||
|
|
||||||
# we link against C++ static libs
|
set_cpp(WITH_STL)
|
||||||
set_cpp()
|
|
||||||
|
|
||||||
include_directories(
|
include_directories(
|
||||||
../../state_trackers/wgl
|
../../state_trackers/wgl
|
||||||
../../winsys/sw
|
../../winsys/sw)
|
||||||
)
|
|
||||||
|
|
||||||
add_definitions(-DWIN32_LEAN_AND_MEAN)
|
add_definitions(-DWIN32_LEAN_AND_MEAN)
|
||||||
|
|
||||||
|
@ -29,8 +27,7 @@ target_link_libraries(mesa32
|
||||||
mesa_core
|
mesa_core
|
||||||
gallium_softpipe
|
gallium_softpipe
|
||||||
gallium_core
|
gallium_core
|
||||||
mesa_glsl
|
mesa_glsl)
|
||||||
)
|
|
||||||
|
|
||||||
set_module_type(mesa32 win32dll)
|
set_module_type(mesa32 win32dll)
|
||||||
|
|
||||||
|
@ -42,4 +39,3 @@ endif()
|
||||||
|
|
||||||
add_dependencies(mesa32 psdk)
|
add_dependencies(mesa32 psdk)
|
||||||
add_cd_file(TARGET mesa32 DESTINATION reactos/system32 FOR all)
|
add_cd_file(TARGET mesa32 DESTINATION reactos/system32 FOR all)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
|
|
||||||
set_cpp()
|
set_cpp(WITH_STL)
|
||||||
|
|
||||||
# From Sconscript
|
# From Sconscript
|
||||||
include_directories(
|
include_directories(
|
||||||
|
@ -18,73 +18,71 @@ list(APPEND SOURCE
|
||||||
../../generated/glsl/builtin_function.cpp
|
../../generated/glsl/builtin_function.cpp
|
||||||
# Regular files
|
# Regular files
|
||||||
strtod.c
|
strtod.c
|
||||||
ralloc.c
|
ralloc.c
|
||||||
glcpp/pp.c
|
glcpp/pp.c
|
||||||
ast_expr.cpp
|
ast_expr.cpp
|
||||||
ast_function.cpp
|
ast_function.cpp
|
||||||
ast_to_hir.cpp
|
ast_to_hir.cpp
|
||||||
ast_type.cpp
|
ast_type.cpp
|
||||||
builtin_variables.cpp
|
builtin_variables.cpp
|
||||||
glsl_parser_extras.cpp
|
glsl_parser_extras.cpp
|
||||||
glsl_types.cpp
|
glsl_types.cpp
|
||||||
glsl_symbol_table.cpp
|
glsl_symbol_table.cpp
|
||||||
hir_field_selection.cpp
|
hir_field_selection.cpp
|
||||||
ir_basic_block.cpp
|
ir_basic_block.cpp
|
||||||
ir_clone.cpp
|
ir_clone.cpp
|
||||||
ir_constant_expression.cpp
|
ir_constant_expression.cpp
|
||||||
ir.cpp
|
ir.cpp
|
||||||
ir_expression_flattening.cpp
|
ir_expression_flattening.cpp
|
||||||
ir_function_can_inline.cpp
|
ir_function_can_inline.cpp
|
||||||
ir_function_detect_recursion.cpp
|
ir_function_detect_recursion.cpp
|
||||||
ir_function.cpp
|
ir_function.cpp
|
||||||
ir_hierarchical_visitor.cpp
|
ir_hierarchical_visitor.cpp
|
||||||
ir_hv_accept.cpp
|
ir_hv_accept.cpp
|
||||||
ir_import_prototypes.cpp
|
ir_import_prototypes.cpp
|
||||||
ir_print_visitor.cpp
|
ir_print_visitor.cpp
|
||||||
ir_reader.cpp
|
ir_reader.cpp
|
||||||
ir_rvalue_visitor.cpp
|
ir_rvalue_visitor.cpp
|
||||||
ir_set_program_inouts.cpp
|
ir_set_program_inouts.cpp
|
||||||
ir_validate.cpp
|
ir_validate.cpp
|
||||||
ir_variable_refcount.cpp
|
ir_variable_refcount.cpp
|
||||||
linker.cpp
|
linker.cpp
|
||||||
link_functions.cpp
|
link_functions.cpp
|
||||||
link_uniforms.cpp
|
link_uniforms.cpp
|
||||||
loop_analysis.cpp
|
loop_analysis.cpp
|
||||||
loop_controls.cpp
|
loop_controls.cpp
|
||||||
loop_unroll.cpp
|
loop_unroll.cpp
|
||||||
lower_clip_distance.cpp
|
lower_clip_distance.cpp
|
||||||
lower_discard.cpp
|
lower_discard.cpp
|
||||||
lower_if_to_cond_assign.cpp
|
lower_if_to_cond_assign.cpp
|
||||||
lower_instructions.cpp
|
lower_instructions.cpp
|
||||||
lower_jumps.cpp
|
lower_jumps.cpp
|
||||||
lower_mat_op_to_vec.cpp
|
lower_mat_op_to_vec.cpp
|
||||||
lower_noise.cpp
|
lower_noise.cpp
|
||||||
lower_texture_projection.cpp
|
lower_texture_projection.cpp
|
||||||
lower_variable_index_to_cond_assign.cpp
|
lower_variable_index_to_cond_assign.cpp
|
||||||
lower_vec_index_to_cond_assign.cpp
|
lower_vec_index_to_cond_assign.cpp
|
||||||
lower_vec_index_to_swizzle.cpp
|
lower_vec_index_to_swizzle.cpp
|
||||||
lower_vector.cpp
|
lower_vector.cpp
|
||||||
lower_output_reads.cpp
|
lower_output_reads.cpp
|
||||||
opt_algebraic.cpp
|
opt_algebraic.cpp
|
||||||
opt_constant_folding.cpp
|
opt_constant_folding.cpp
|
||||||
opt_constant_propagation.cpp
|
opt_constant_propagation.cpp
|
||||||
opt_constant_variable.cpp
|
opt_constant_variable.cpp
|
||||||
opt_copy_propagation.cpp
|
opt_copy_propagation.cpp
|
||||||
opt_copy_propagation_elements.cpp
|
opt_copy_propagation_elements.cpp
|
||||||
opt_dead_code.cpp
|
opt_dead_code.cpp
|
||||||
opt_dead_code_local.cpp
|
opt_dead_code_local.cpp
|
||||||
opt_dead_functions.cpp
|
opt_dead_functions.cpp
|
||||||
opt_discard_simplification.cpp
|
opt_discard_simplification.cpp
|
||||||
opt_function_inlining.cpp
|
opt_function_inlining.cpp
|
||||||
opt_if_simplification.cpp
|
opt_if_simplification.cpp
|
||||||
opt_noop_swizzle.cpp
|
opt_noop_swizzle.cpp
|
||||||
opt_redundant_jumps.cpp
|
opt_redundant_jumps.cpp
|
||||||
opt_structure_splitting.cpp
|
opt_structure_splitting.cpp
|
||||||
opt_swizzle_swizzle.cpp
|
opt_swizzle_swizzle.cpp
|
||||||
opt_tree_grafting.cpp
|
opt_tree_grafting.cpp
|
||||||
s_expression.cpp)
|
s_expression.cpp)
|
||||||
|
|
||||||
#this is just a helper library, don't include it in the all target
|
# this is just a helper library, don't include it in the all target
|
||||||
add_library(mesa_glsl STATIC EXCLUDE_FROM_ALL ${SOURCE})
|
add_library(mesa_glsl STATIC EXCLUDE_FROM_ALL ${SOURCE})
|
||||||
|
|
||||||
|
|
|
@ -4,8 +4,7 @@ add_definitions(
|
||||||
-D_GDI32_ # prevent gl* being declared __declspec(dllimport) in MS headers
|
-D_GDI32_ # prevent gl* being declared __declspec(dllimport) in MS headers
|
||||||
-DBUILD_GL32 # declare gl* as __declspec(dllexport) in Mesa headers
|
-DBUILD_GL32 # declare gl* as __declspec(dllexport) in Mesa headers
|
||||||
-D_GLAPI_NO_EXPORTS # prevent _glapi_* from being declared __declspec(dllimport)
|
-D_GLAPI_NO_EXPORTS # prevent _glapi_* from being declared __declspec(dllimport)
|
||||||
-DKHRONOS_DLL_EXPORTS
|
-DKHRONOS_DLL_EXPORTS)
|
||||||
)
|
|
||||||
|
|
||||||
if((ARCH STREQUAL "i386") AND (NOT MSVC))
|
if((ARCH STREQUAL "i386") AND (NOT MSVC))
|
||||||
list(APPEND SOURCE glapi_x86.S)
|
list(APPEND SOURCE glapi_x86.S)
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
|
|
||||||
|
set_cpp(WITH_STL)
|
||||||
|
|
||||||
add_definitions(
|
add_definitions(
|
||||||
-DFEATURE_GL=1
|
-DFEATURE_GL=1
|
||||||
-D_GDI32_ # prevent gl* being declared __declspec(dllimport) in MS headers
|
-D_GDI32_ # prevent gl* being declared __declspec(dllimport) in MS headers
|
||||||
|
@ -13,9 +15,6 @@ include_directories(
|
||||||
.
|
.
|
||||||
../../generated/mesa)
|
../../generated/mesa)
|
||||||
|
|
||||||
# This library uses C++
|
|
||||||
set_cpp()
|
|
||||||
|
|
||||||
if((ARCH STREQUAL "i386") AND (NOT MSVC))
|
if((ARCH STREQUAL "i386") AND (NOT MSVC))
|
||||||
list(APPEND SOURCE
|
list(APPEND SOURCE
|
||||||
x86/common_x86.c
|
x86/common_x86.c
|
||||||
|
|
|
@ -1,13 +1,9 @@
|
||||||
|
|
||||||
set_cpp()
|
set_cpp(WITH_RUNTIME)
|
||||||
|
|
||||||
add_definitions(
|
add_definitions(
|
||||||
-D__WINESRC__)
|
-D__WINESRC__)
|
||||||
|
|
||||||
if (MSVC)
|
|
||||||
add_compile_flags("/EHa-")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
remove_definitions(-D_WIN32_WINNT=0x502)
|
remove_definitions(-D_WIN32_WINNT=0x502)
|
||||||
add_definitions(-D_WIN32_WINNT=0x600)
|
add_definitions(-D_WIN32_WINNT=0x600)
|
||||||
|
|
||||||
|
@ -70,4 +66,3 @@ add_importlibs(browseui
|
||||||
|
|
||||||
add_pch(browseui precomp.h)
|
add_pch(browseui precomp.h)
|
||||||
add_cd_file(TARGET browseui DESTINATION reactos/system32 FOR all)
|
add_cd_file(TARGET browseui DESTINATION reactos/system32 FOR all)
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,11 @@
|
||||||
|
|
||||||
|
set_cpp(WITH_RUNTIME)
|
||||||
|
|
||||||
remove_definitions(-D_WIN32_WINNT=0x502)
|
remove_definitions(-D_WIN32_WINNT=0x502)
|
||||||
add_definitions(-D_WIN32_WINNT=0x600)
|
add_definitions(-D_WIN32_WINNT=0x600)
|
||||||
|
|
||||||
add_definitions(-D_NETSHELL_)
|
add_definitions(-D_NETSHELL_)
|
||||||
set_cpp()
|
|
||||||
spec2def(netshell.dll netshell.spec)
|
spec2def(netshell.dll netshell.spec)
|
||||||
|
|
||||||
list(APPEND SOURCE
|
list(APPEND SOURCE
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
set_cpp()
|
|
||||||
|
set_cpp(WITH_RUNTIME)
|
||||||
|
|
||||||
remove_definitions(-D_WIN32_WINNT=0x502)
|
remove_definitions(-D_WIN32_WINNT=0x502)
|
||||||
add_definitions(-D_WIN32_WINNT=0x600)
|
add_definitions(-D_WIN32_WINNT=0x600)
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
|
|
||||||
|
set_cpp()
|
||||||
|
|
||||||
include_directories(
|
include_directories(
|
||||||
BEFORE ${CMAKE_CURRENT_SOURCE_DIR}
|
BEFORE ${CMAKE_CURRENT_SOURCE_DIR}
|
||||||
inc)
|
inc)
|
||||||
|
|
||||||
#add_definitions(-D_DEBUG)
|
#add_definitions(-D_DEBUG)
|
||||||
|
|
||||||
set_cpp()
|
|
||||||
|
|
||||||
list(APPEND SOURCE
|
list(APPEND SOURCE
|
||||||
id_ata.cpp
|
id_ata.cpp
|
||||||
id_badblock.cpp
|
id_badblock.cpp
|
||||||
|
@ -19,14 +19,11 @@ list(APPEND SOURCE
|
||||||
|
|
||||||
add_library(uniata SHARED ${SOURCE} idedma.rc)
|
add_library(uniata SHARED ${SOURCE} idedma.rc)
|
||||||
|
|
||||||
# FIXME: http://www.cmake.org/Bug/view.php?id=12998
|
|
||||||
if(MSVC)
|
if(NOT MSVC)
|
||||||
#add_target_compile_flags(uniata "/GR-")
|
# FIXME: http://www.cmake.org/Bug/view.php?id=12998
|
||||||
set_source_files_properties(${SOURCE} PROPERTIES COMPILE_FLAGS "/GR-")
|
|
||||||
else()
|
|
||||||
#allow_warnings(uniata)
|
#allow_warnings(uniata)
|
||||||
#add_target_compile_flags(uniata "-fno-exceptions -fno-rtti")
|
set_source_files_properties(${SOURCE} PROPERTIES COMPILE_FLAGS "-Wno-error")
|
||||||
set_source_files_properties(${SOURCE} PROPERTIES COMPILE_FLAGS "-fno-exceptions -fno-rtti -Wno-error")
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_pch(uniata stdafx.h)
|
add_pch(uniata stdafx.h)
|
||||||
|
|
|
@ -21,16 +21,6 @@ target_link_libraries(usbehci
|
||||||
libcntpr
|
libcntpr
|
||||||
${PSEH_LIB})
|
${PSEH_LIB})
|
||||||
|
|
||||||
# FIXME: http://www.cmake.org/Bug/view.php?id=12998
|
|
||||||
if(MSVC)
|
|
||||||
#add_target_compile_flags(usbehci "/GR-")
|
|
||||||
set_source_files_properties(${SOURCE} PROPERTIES COMPILE_FLAGS "/GR-")
|
|
||||||
else()
|
|
||||||
target_link_libraries(usbehci -lgcc)
|
|
||||||
#add_target_compile_flags(usbehci "-fno-exceptions -fno-rtti")
|
|
||||||
set_source_files_properties(${SOURCE} PROPERTIES COMPILE_FLAGS "-fno-exceptions -fno-rtti")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
set_module_type(usbehci kernelmodedriver)
|
set_module_type(usbehci kernelmodedriver)
|
||||||
add_importlibs(usbehci ntoskrnl hal usbd)
|
add_importlibs(usbehci ntoskrnl hal usbd)
|
||||||
|
|
||||||
|
|
|
@ -21,16 +21,6 @@ target_link_libraries(usbohci
|
||||||
libcntpr
|
libcntpr
|
||||||
${PSEH_LIB})
|
${PSEH_LIB})
|
||||||
|
|
||||||
# FIXME: http://www.cmake.org/Bug/view.php?id=12998
|
|
||||||
if(MSVC)
|
|
||||||
#add_target_compile_flags(usbohci "/GR-")
|
|
||||||
set_source_files_properties(${SOURCE} PROPERTIES COMPILE_FLAGS "/GR-")
|
|
||||||
else()
|
|
||||||
target_link_libraries(usbohci -lgcc)
|
|
||||||
#add_target_compile_flags(usbohci "-fno-exceptions -fno-rtti")
|
|
||||||
set_source_files_properties(${SOURCE} PROPERTIES COMPILE_FLAGS "-fno-exceptions -fno-rtti")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
set_module_type(usbohci kernelmodedriver)
|
set_module_type(usbohci kernelmodedriver)
|
||||||
add_importlibs(usbohci ntoskrnl hal usbd)
|
add_importlibs(usbohci ntoskrnl hal usbd)
|
||||||
|
|
||||||
|
|
|
@ -22,16 +22,6 @@ target_link_libraries(usbuhci
|
||||||
libcntpr
|
libcntpr
|
||||||
${PSEH_LIB})
|
${PSEH_LIB})
|
||||||
|
|
||||||
# FIXME: http://www.cmake.org/Bug/view.php?id=12998
|
|
||||||
if(MSVC)
|
|
||||||
#add_target_compile_flags(usbuhci "/GR-")
|
|
||||||
set_source_files_properties(${SOURCE} PROPERTIES COMPILE_FLAGS "/GR-")
|
|
||||||
else()
|
|
||||||
target_link_libraries(usbuhci -lgcc)
|
|
||||||
#add_target_compile_flags(usbuhci "-fno-exceptions -fno-rtti")
|
|
||||||
set_source_files_properties(${SOURCE} PROPERTIES COMPILE_FLAGS "-fno-exceptions -fno-rtti")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
set_module_type(usbuhci kernelmodedriver)
|
set_module_type(usbuhci kernelmodedriver)
|
||||||
add_importlibs(usbuhci ntoskrnl hal usbd)
|
add_importlibs(usbuhci ntoskrnl hal usbd)
|
||||||
|
|
||||||
|
|
|
@ -57,15 +57,6 @@ target_link_libraries(portcls
|
||||||
libcntpr
|
libcntpr
|
||||||
${PSEH_LIB})
|
${PSEH_LIB})
|
||||||
|
|
||||||
# FIXME: http://www.cmake.org/Bug/view.php?id=12998
|
|
||||||
if(MSVC)
|
|
||||||
#add_target_compile_flags(portcls "/GR-")
|
|
||||||
set_source_files_properties(${SOURCE} PROPERTIES COMPILE_FLAGS "/GR-")
|
|
||||||
else()
|
|
||||||
#add_target_compile_flags(portcls "-fno-exceptions -fno-rtti")
|
|
||||||
set_source_files_properties(${SOURCE} PROPERTIES COMPILE_FLAGS "-fno-exceptions -fno-rtti")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
set_module_type(portcls kernelmodedriver ENTRYPOINT 0 )
|
set_module_type(portcls kernelmodedriver ENTRYPOINT 0 )
|
||||||
add_pch(portcls private.hpp)
|
add_pch(portcls private.hpp)
|
||||||
add_importlibs(portcls ntoskrnl ks drmk hal)
|
add_importlibs(portcls ntoskrnl ks drmk hal)
|
||||||
|
|
|
@ -12,33 +12,23 @@ list(APPEND SOURCE
|
||||||
adapter.cpp
|
adapter.cpp
|
||||||
common.cpp
|
common.cpp
|
||||||
mintopo.cpp
|
mintopo.cpp
|
||||||
minwave.cpp
|
minwave.cpp)
|
||||||
)
|
|
||||||
|
|
||||||
add_library(cmipci SHARED
|
add_library(cmipci SHARED
|
||||||
${SOURCE}
|
${SOURCE}
|
||||||
cmipci.rc
|
cmipci.rc)
|
||||||
)
|
|
||||||
|
|
||||||
target_link_libraries(cmipci
|
target_link_libraries(cmipci stdunk libcntpr)
|
||||||
stdunk
|
|
||||||
libcntpr
|
|
||||||
)
|
|
||||||
|
|
||||||
set_module_type(cmipci wdmdriver UNICODE ENTRYPOINT 0)
|
set_module_type(cmipci wdmdriver UNICODE ENTRYPOINT 0)
|
||||||
|
|
||||||
add_importlibs(cmipci
|
add_importlibs(cmipci portcls hal ntoskrnl)
|
||||||
portcls
|
|
||||||
hal
|
|
||||||
ntoskrnl)
|
|
||||||
|
|
||||||
# FIXME: http://www.cmake.org/Bug/view.php?id=12998
|
if(NOT MSVC)
|
||||||
if(MSVC)
|
# FIXME: http://www.cmake.org/Bug/view.php?id=12998
|
||||||
#add_target_compile_flags(portcls "/GR-")
|
#add_target_compile_flags(portcls "-Wno-write-strings -Wno-switch")
|
||||||
set_source_files_properties(${SOURCE} PROPERTIES COMPILE_FLAGS "/GR-")
|
#allow_warnings(portcls)
|
||||||
else()
|
set_source_files_properties(${SOURCE} PROPERTIES COMPILE_FLAGS "-Wno-write-strings -Wno-switch -Wno-error")
|
||||||
#add_target_compile_flags(portcls "-fno-exceptions -fno-rtti")
|
|
||||||
set_source_files_properties(${SOURCE} PROPERTIES COMPILE_FLAGS "-fno-exceptions -fno-rtti -Wno-write-strings -Wno-switch -Wno-error")
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_cd_file(TARGET cmipci DESTINATION reactos/system32/drivers FOR all)
|
add_cd_file(TARGET cmipci DESTINATION reactos/system32/drivers FOR all)
|
||||||
|
|
|
@ -1,16 +1,13 @@
|
||||||
|
|
||||||
include_directories(..)
|
|
||||||
|
|
||||||
set_cpp()
|
set_cpp()
|
||||||
|
|
||||||
|
include_directories(..)
|
||||||
|
|
||||||
add_executable(cmicontrol
|
add_executable(cmicontrol
|
||||||
main.cpp
|
main.cpp
|
||||||
window.rc
|
window.rc)
|
||||||
)
|
|
||||||
|
|
||||||
# FIXME: http://www.cmake.org/Bug/view.php?id=12998
|
|
||||||
if(NOT MSVC)
|
if(NOT MSVC)
|
||||||
#add_target_compile_flags(cmicontrol "-fno-exceptions -fno-rtti")
|
|
||||||
set_source_files_properties(main.cpp PROPERTIES COMPILE_FLAGS "-Wno-write-strings")
|
set_source_files_properties(main.cpp PROPERTIES COMPILE_FLAGS "-Wno-write-strings")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
@ -25,8 +22,7 @@ add_importlibs(cmicontrol
|
||||||
setupapi
|
setupapi
|
||||||
winmm
|
winmm
|
||||||
msvcrt
|
msvcrt
|
||||||
kernel32
|
kernel32)
|
||||||
)
|
|
||||||
|
|
||||||
set_module_type(cmicontrol win32gui)
|
set_module_type(cmicontrol win32gui)
|
||||||
|
|
||||||
|
|
|
@ -3,19 +3,8 @@ set_cpp()
|
||||||
|
|
||||||
add_library(cmicpl SHARED
|
add_library(cmicpl SHARED
|
||||||
cmicpl.cpp
|
cmicpl.cpp
|
||||||
cmicpl.rc
|
cmicpl.rc)
|
||||||
)
|
|
||||||
|
|
||||||
set_module_type(cmicpl cpl UNICODE)
|
set_module_type(cmicpl cpl UNICODE)
|
||||||
|
add_importlibs(cmicpl shell32 msvcrt kernel32)
|
||||||
add_importlibs(cmicpl
|
|
||||||
shell32
|
|
||||||
msvcrt
|
|
||||||
kernel32
|
|
||||||
)
|
|
||||||
|
|
||||||
if (NOT MSVC)
|
|
||||||
target_link_libraries(cmicpl -lgcc)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
add_cd_file(TARGET cmicpl DESTINATION reactos/system32/drivers FOR all)
|
add_cd_file(TARGET cmicpl DESTINATION reactos/system32/drivers FOR all)
|
||||||
|
|
|
@ -1,4 +1,8 @@
|
||||||
|
|
||||||
|
if(NOT MSVC)
|
||||||
|
set_cpp(WITH_RTTI)
|
||||||
|
endif()
|
||||||
|
|
||||||
add_definitions(
|
add_definitions(
|
||||||
-DUNICODE -D_UNICODE
|
-DUNICODE -D_UNICODE
|
||||||
-DROS_Headers)
|
-DROS_Headers)
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
|
||||||
set_cpp()
|
set_cpp()
|
||||||
|
|
||||||
remove_definitions(-D_WIN32_WINNT=0x502)
|
remove_definitions(-D_WIN32_WINNT=0x502)
|
||||||
|
@ -18,12 +19,3 @@ list(APPEND SOURCE
|
||||||
|
|
||||||
add_library(libusb ${SOURCE})
|
add_library(libusb ${SOURCE})
|
||||||
add_dependencies(libusb bugcodes)
|
add_dependencies(libusb bugcodes)
|
||||||
|
|
||||||
# FIXME: http://www.cmake.org/Bug/view.php?id=12998
|
|
||||||
if(MSVC)
|
|
||||||
#add_target_compile_flags(libusb "/GR-")
|
|
||||||
set_source_files_properties(${SOURCE} PROPERTIES COMPILE_FLAGS "/GR-")
|
|
||||||
else()
|
|
||||||
#add_target_compile_flags(libusb "-fno-exceptions -fno-rtti")
|
|
||||||
set_source_files_properties(${SOURCE} PROPERTIES COMPILE_FLAGS "-fno-exceptions -fno-rtti")
|
|
||||||
endif()
|
|
||||||
|
|
|
@ -2,9 +2,3 @@
|
||||||
set_cpp()
|
set_cpp()
|
||||||
|
|
||||||
add_library(stdunk STATIC cunknown.cpp)
|
add_library(stdunk STATIC cunknown.cpp)
|
||||||
|
|
||||||
if(MSVC)
|
|
||||||
add_target_compile_flags(stdunk "/GR-")
|
|
||||||
else()
|
|
||||||
add_target_compile_flags(stdunk "-fno-exceptions -fno-rtti")
|
|
||||||
endif()
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
|
|
||||||
set_cpp()
|
set_cpp(WITH_EXCEPTIONS)
|
||||||
|
|
||||||
add_library(comsupp comsupp.cpp)
|
add_library(comsupp comsupp.cpp)
|
||||||
add_dependencies(comsupp psdk)
|
add_dependencies(comsupp psdk)
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
|
|
||||||
set_cpp()
|
set_cpp(WITH_EXCEPTIONS WITH_STL)
|
||||||
|
|
||||||
list(APPEND SOURCE
|
list(APPEND SOURCE
|
||||||
CConfiguration.cpp
|
CConfiguration.cpp
|
||||||
|
|
Loading…
Reference in a new issue