Fix CMake problem with headers, fixed sourcery cross compile detection

This commit is contained in:
Thulinma 2017-03-07 17:00:49 +01:00
parent 0ea100758d
commit 907d48b7e5
2 changed files with 7 additions and 5 deletions

View file

@ -194,8 +194,10 @@ install(
######################################## ########################################
add_custom_command(TARGET mist add_custom_command(TARGET mist
POST_BUILD POST_BUILD
COMMAND mkdir -p ${BINARY_DIR}/mist COMMAND ${CMAKE_COMMAND}
COMMAND cp ${libHeaders} ${BINARY_DIR}/mist ARGS -E make_directory ${BINARY_DIR}/mist
COMMAND ${CMAKE_COMMAND}
ARGS -E copy_if_different ${libHeaders} ${BINARY_DIR}/mist
DEPENDS ${libHeaders} DEPENDS ${libHeaders}
) )
@ -361,7 +363,7 @@ else()
try_run(RUNA RUNB ${BINARY_DIR}/CMakeTmp ${SOURCE_DIR}/src/sourcery.cpp ) try_run(RUNA RUNB ${BINARY_DIR}/CMakeTmp ${SOURCE_DIR}/src/sourcery.cpp )
endif() endif()
if("${RUNA}" EQUAL "0") if("${RUNA}" EQUAL "2")
message("Not cross compiling - building sourcery") message("Not cross compiling - building sourcery")
add_executable(sourcery add_executable(sourcery
src/sourcery.cpp src/sourcery.cpp

View file

@ -8,7 +8,7 @@
int main(int argc, char* argv[]){ int main(int argc, char* argv[]){
if (argc < 4) { if (argc < 4) {
std::cerr << "Usage: " << argv[0] << " <inputFile> <variableName> <outputFile>" << std::endl; std::cerr << "Usage: " << argv[0] << " <inputFile> <variableName> <outputFile>" << std::endl;
return 1; return 2;
} }
std::ofstream tmp(argv[3]); std::ofstream tmp(argv[3]);
//begin the first line //begin the first line