comparison CMakeLists.txt @ 49:e00776053828

CMake: command "cmake -DDC=compiler_name" work correctly now.
author SokoL_SD
date Mon, 18 May 2009 06:50:10 +0000
parents 3cb15c92ac28
children cc557203146c
comparison
equal deleted inserted replaced
48:2085c2157b50 49:e00776053828
17 17
18 ## Strip utility. 18 ## Strip utility.
19 find_program(STRIP strip) 19 find_program(STRIP strip)
20 20
21 ## Find D compiler and parsing its version. 21 ## Find D compiler and parsing its version.
22
22 find_program(DC dmd ldc) 23 find_program(DC dmd ldc)
23 if (DC) 24 if (DC)
25 get_filename_component(dc_path ${DC} PATH)
26 if("${dc_path}" STREQUAL ${CMAKE_BINARY_DIR})
27 get_filename_component(DC ${DC} NAME)
28 endif("${dc_path}" STREQUAL ${CMAKE_BINARY_DIR})
24 exec_program(${DC} ARGS "" OUTPUT_VARIABLE d_output) 29 exec_program(${DC} ARGS "" OUTPUT_VARIABLE d_output)
25 string(REGEX MATCH "Digital Mars D Compiler v[0-9]\\.[0-9]+" dmd_version "${d_output}") 30 string(REGEX MATCH "Digital Mars D Compiler v[0-9]\\.[0-9]+" dmd_version "${d_output}")
26 if (dmd_version) 31 if (dmd_version)
27 set(D_IS_MARS true) 32 set(D_IS_MARS true)
28 set(D_IS_DMD true) 33 set(D_IS_DMD true)