# HG changeset patch # User SokoL_SD # Date 1242629410 0 # Node ID e00776053828c7a0225cb790829bc18f323aca83 # Parent 2085c2157b507cbb78a84eee5e0dbca477e27757 CMake: command "cmake -DDC=compiler_name" work correctly now. diff -r 2085c2157b50 -r e00776053828 CMakeLists.txt --- a/CMakeLists.txt Mon May 18 00:22:14 2009 +0000 +++ b/CMakeLists.txt Mon May 18 06:50:10 2009 +0000 @@ -19,8 +19,13 @@ find_program(STRIP strip) ## Find D compiler and parsing its version. + find_program(DC dmd ldc) if (DC) + get_filename_component(dc_path ${DC} PATH) + if("${dc_path}" STREQUAL ${CMAKE_BINARY_DIR}) + get_filename_component(DC ${DC} NAME) + endif("${dc_path}" STREQUAL ${CMAKE_BINARY_DIR}) exec_program(${DC} ARGS "" OUTPUT_VARIABLE d_output) string(REGEX MATCH "Digital Mars D Compiler v[0-9]\\.[0-9]+" dmd_version "${d_output}") if (dmd_version)