This commit is contained in:
Christoph Oelckers 2013-11-24 10:27:35 +01:00
commit 9cd59ddfcd
2 changed files with 7 additions and 5 deletions

View file

@ -17,13 +17,15 @@ add_definitions( -DINFNAN_CHECK -DMULTIPLE_THREADS )
if( NOT MSVC ) if( NOT MSVC )
add_executable( arithchk arithchk.c ) add_executable( arithchk arithchk.c )
get_target_property( ARITHCHK_EXE arithchk LOCATION )
add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/arith.h add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/arith.h
COMMAND ${CMAKE_CURRENT_BINARY_DIR}/arithchk >${CMAKE_CURRENT_BINARY_DIR}/arith.h COMMAND ${ARITHCHK_EXE} >${CMAKE_CURRENT_BINARY_DIR}/arith.h
DEPENDS arithchk ) DEPENDS arithchk )
add_executable( qnan qnan.c arith.h ) add_executable( qnan qnan.c arith.h )
get_target_property( QNAN_EXE qnan LOCATION )
add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/gd_qnan.h add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/gd_qnan.h
COMMAND ${CMAKE_CURRENT_BINARY_DIR}/qnan >${CMAKE_CURRENT_BINARY_DIR}/gd_qnan.h COMMAND ${QNAN_EXE} >${CMAKE_CURRENT_BINARY_DIR}/gd_qnan.h
DEPENDS qnan ) DEPENDS qnan )
set( GEN_FP_FILES arith.h gd_qnan.h ) set( GEN_FP_FILES arith.h gd_qnan.h )

View file

@ -5,13 +5,13 @@ set( CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -D_DEBUG" )
add_executable( lemon lemon.c ) add_executable( lemon lemon.c )
# Lemon wants lempar.c in its directory # Lemon wants lempar.c in its directory
if( MSVC ) if( NOT NO_GENERATOR_EXPRESSIONS )
add_custom_command( TARGET lemon add_custom_command( TARGET lemon
POST_BUILD POST_BUILD
COMMAND echo $<TARGET_FILE_DIR:lemon> COMMAND echo $<TARGET_FILE_DIR:lemon>
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_SOURCE_DIR}/lempar.c $<TARGET_FILE_DIR:lemon> ) COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_SOURCE_DIR}/lempar.c $<TARGET_FILE_DIR:lemon> )
else( MSVC ) else( NOT NO_GENERATOR_EXPRESSIONS )
add_custom_command( TARGET lemon add_custom_command( TARGET lemon
POST_BUILD POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_SOURCE_DIR}/lempar.c ${CMAKE_CURRENT_BINARY_DIR} ) COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_SOURCE_DIR}/lempar.c ${CMAKE_CURRENT_BINARY_DIR} )
endif( MSVC ) endif( NOT NO_GENERATOR_EXPRESSIONS )