X-Git-Url: http://mmka.chem.univ.gda.pl/gitweb/?a=blobdiff_plain;f=CMakeLists.txt;h=87e95241934519698802ea785e6ca26f666722f4;hb=21e268b48ee81f0daa1d58979558d4bf12dc72c8;hp=c084cff9793cd35d57ca0c01b10fcae07153bf43;hpb=2bea4111aa69047b467a4952948d4379fc2cef0a;p=unres.git diff --git a/CMakeLists.txt b/CMakeLists.txt index c084cff..87e9524 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -28,7 +28,7 @@ get_filename_component (Fortran_COMPILER_NAME ${CMAKE_Fortran_COMPILER} NAME) # Altough cmake enables you to set some compiler definitions it seems by default they are ignored. # This is a workaround to pass compiler definitions (preprocesor flags) to fortran compilers like ifort -SET(CMAKE_Fortran_COMPILE_OBJECT " ${CMAKE_START_TEMP_FILE} -o ${CMAKE_END_TEMP_FILE}") +SET(CMAKE_Fortran_COMPILE_OBJECT " ${CMAKE_START_TEMP_FILE} -c -o ${CMAKE_END_TEMP_FILE}") #set(CPPFLAGS "-DPROCOR -DLINUX -DPGI -DUNRES -DISNAN -DMP -DMPI -DSPLITELE -DLANGO -DCRYST_BOND -DCRYST_THETA -DCRYST_SC" ) #add_definitions( ${CPPFLAGS} ) @@ -90,15 +90,35 @@ if (MPIF_FOUND) message("MPIF_INCLUDE_DIRECTORIES=${MPIF_INCLUDE_DIRECTORIES}" ) endif(MPIF_FOUND) + + +#====================================== +# Detect system architecture +# + +if( CMAKE_SIZEOF_VOID_P EQUAL 4 ) + set(architektura "32") +else (CMAKE_SIZEOF_VOID_P EQUAL 4) + set(architektura "64") +endif( CMAKE_SIZEOF_VOID_P EQUAL 4 ) + +message("Detected ${architektura}-bit architecture") + + #======================================= # Create diractories for build targets #======================================= -execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/bin/unres/MD ) +#execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/bin/unres/MD ) #======================================= # Add source files #======================================= add_subdirectory(source/unres/src_MD) +if(UNRES_WITH_MPI) +# add_subdirectory(source/unres/src_CSA) + add_subdirectory(source/unres/src_MD-M) +endif() +add_subdirectory(source/unres/src_MIN)