X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/addbe55ea4ec95a86c3e9d4e6309bac9fed1e2b7..db5be29f73ecbdd4e645849a941ccdd387bd858f:/doc/HelloWorld/CMakeLists.txt diff --git a/doc/HelloWorld/CMakeLists.txt b/doc/HelloWorld/CMakeLists.txt index a74538de30..02d42f5c9f 100644 --- a/doc/HelloWorld/CMakeLists.txt +++ b/doc/HelloWorld/CMakeLists.txt @@ -3,11 +3,11 @@ cmake_minimum_required(VERSION 2.8) ### Need to set rc ccompiler before enable language if(WIN32) - SET(CMAKE_RC_COMPILER "windres") - set(LIBRARIES_DEP simgrid pcre ws2_32 pthread) -else(WIN32) - set(LIBRARIES_DEP simgrid pcre pthread) -endif(WIN32) + SET(CMAKE_RC_COMPILER "windres") + set(LIBRARIES_DEP simgrid ws2_32 pthread) +else() + set(LIBRARIES_DEP simgrid pthread) +endif() project(MY_SIMGRID_PROJECT C) @@ -17,32 +17,31 @@ set(CMAKE_EXE_LINKER_FLAGS "" CACHE TYPE INTERNAL FORCE) ############################### # Test the build dependencies # ############################### -include(FindPCRE.cmake) message(STATUS "Looking for lib Simgrid") if("$ENV{SIMGRID_ROOT}" STREQUAL "") - message(STATUS "Looking for lib Simgrid - Not found") - message(FATAL_ERROR "Simgrid not found, reinstall it or set SIMGRID_ROOT") -else("$ENV{SIMGRID_ROOT}" STREQUAL "") - link_directories($ENV{SIMGRID_ROOT}/lib) - include_directories($ENV{SIMGRID_ROOT}/include) - include_directories($ENV{SIMGRID_ROOT}/src) - include_directories($ENV{SIMGRID_ROOT}/src/include) - message(STATUS "Looking for lib Simgrid - found") -endif("$ENV{SIMGRID_ROOT}" STREQUAL "") + message(STATUS "Looking for lib Simgrid - Not found") + message(FATAL_ERROR "Simgrid not found, reinstall it or set SIMGRID_ROOT") +else() + link_directories($ENV{SIMGRID_ROOT}/lib) + include_directories($ENV{SIMGRID_ROOT}/include) + include_directories($ENV{SIMGRID_ROOT}/src) + include_directories($ENV{SIMGRID_ROOT}/src/include) + message(STATUS "Looking for lib Simgrid - found") +endif() ################ # FIND TARGETS # ################ file(GLOB SOURCE_FILE -RELATIVE ${CMAKE_HOME_DIRECTORY}/ -"*.c" -) + RELATIVE ${CMAKE_HOME_DIRECTORY}/ + "*.c" + ) string(REPLACE ".c" "" TARGET_NAME ${SOURCE_FILE}) foreach(target "${TARGET_NAME}") - add_executable(${target} "${target}.c") - message(STATUS "source_file: ${target}.c") - message(STATUS "target name: ${target}.exe") - # Any targets need to be linked with libraries - target_link_libraries(${target} ${LIBRARIES_DEP}) + add_executable(${target} "${target}.c") + message(STATUS "source_file: ${target}.c") + message(STATUS "target name: ${target}.exe") + # Any targets need to be linked with libraries + target_link_libraries(${target} ${LIBRARIES_DEP}) endforeach(target ${SOURCE_FILE})