[CMake] add_definitions: if option contains space and using FindCUDA, it won't get added to compiler call

2016-03-24 Thread xyzdragon
Here is a minimal working-example without FindCUDA: main.cpp: int main(void){ return 0; } CMakeLists.txt: cmake_minimum_required(VERSION 3.5) add_definitions( "-D USE_FEATURE" ) add_library( mimi main.cpp ) target_link_libraries( mimi ) the output will be: /usr/bin/g++

[CMake] execute_process seems to execute in parallel and also only shows output of last command

2016-03-24 Thread xyzdragon
I'm using cmake --version cmake version 3.5.0 # First let me tell you, what I wanted to achieve: I wanted to recursively build some submodule, if that makes sense or not should be the matter here: execute_process( COMMAND cmake .. COMMAND make WO