PageRenderTime 13ms CodeModel.GetById 7ms app.highlight 2ms RepoModel.GetById 1ms app.codeStats 0ms

/tests/CMakeLists.txt

http://crashrpt.googlecode.com/
CMake | 44 lines | 25 code | 12 blank | 7 comment | 1 complexity | f758d9cbf032fb8ac30c3f4c85a07911 MD5 | raw file
 1project(Tests)
 2
 3# Create the list of source files
 4aux_source_directory( . source_files )
 5file( GLOB header_files *.h )
 6
 7list(APPEND source_files ${CMAKE_SOURCE_DIR}/reporting/CrashRpt/Utility.cpp)
 8
 9# Enable usage of precompiled header
10set(srcs_using_precomp ${source_files})
11list(REMOVE_ITEM srcs_using_precomp ./stdafx.cpp )
12add_msvc_precompiled_header(stdafx.h ./stdafx.cpp srcs_using_precomp )
13
14# Define _UNICODE (use wide-char encoding)
15add_definitions(-D_UNICODE )
16
17if(NOT CRASHRPT_BUILD_SHARED_LIBS)
18	add_definitions(-DCRASHRPT_LIB )
19endif(NOT CRASHRPT_BUILD_SHARED_LIBS)
20
21fix_default_compiler_settings_()
22
23foreach (flag_var
24	CMAKE_C_FLAGS_RELEASE CMAKE_CXX_FLAGS_RELEASE )
25	string(REPLACE "/O2" "-Od" ${flag_var} "${${flag_var}}")
26	string(REPLACE "/Ob2" "" ${flag_var} "${${flag_var}}")	
27	set(${flag_var} "${${flag_var}} /Zi /fp:except /MP") 
28endforeach()    
29
30set(CMAKE_EXE_LINKER_FLAGS_RELEASE "${CMAKE_EXE_LINKER_FLAGS_RELEASE} /DEBUG") 
31
32# Add include dir
33include_directories( ${CMAKE_SOURCE_DIR}/include 
34                     ${CMAKE_SOURCE_DIR}/reporting/CrashRpt
35					 ${CMAKE_SOURCE_DIR}/thirdparty/wtl )
36
37# Add executable build target
38add_executable(Tests ${source_files} ${header_files})
39
40# Add input link libraries
41target_link_libraries(Tests CrashRpt CrashRptProbe)
42
43set_target_properties(Tests PROPERTIES DEBUG_POSTFIX d )
44#set_target_properties(Tests PROPERTIES COMPILE_FLAGS "/Zi" LINK_FLAGS "/DEBUG")