Commit 60544817 authored by Nicolas Van der Noot's avatar Nicolas Van der Noot
Browse files

remove useless endif arguments

parent ec834984
......@@ -48,7 +48,7 @@ function(flags_check)
if (NOT FLAG_REAL_TIME)
set(FLAG_PLOT OFF PARENT_SCOPE)
set(FLAG_VISU OFF PARENT_SCOPE)
endif (NOT FLAG_REAL_TIME)
endif( )
endfunction()
......@@ -59,9 +59,9 @@ endfunction()
function(release_debug)
if (FLAG_RELEASE)
set(CMAKE_BUILD_TYPE Release PARENT_SCOPE)
else (FLAG_RELEASE)
else ( )
set(CMAKE_BUILD_TYPE Debug PARENT_SCOPE)
endif (FLAG_RELEASE)
endif( )
endfunction()
......@@ -72,20 +72,20 @@ endfunction()
function(definitions)
if(UNIX)
add_definitions( -DUNIX )
endif (UNIX)
endif( )
add_definitions( -DDIRDYNARED )
add_definitions( -DCMEX ) # note: CMEX was defined for Simulink stuff, it should be modified because the Standalone version was added !
if(FLAG_REAL_TIME)
add_definitions( -DREAL_TIME )
endif (FLAG_REAL_TIME)
endif( )
if(FLAG_PLOT)
add_definitions( -DSDL )
endif (FLAG_PLOT)
endif( )
if(FLAG_VISU)
add_definitions( -DJAVA )
endif (FLAG_VISU)
endif( )
endfunction()
......@@ -6,9 +6,9 @@ function(xml_lib)
if (LIBXML2_FOUND)
include_directories (${LIBXML2_INCLUDE_PATH})
message( "\n >> Libxml2 found")
else (LIBXML2_FOUND)
else ( )
message( "\n >> Libxml2 not found, modify ${ROBOTRAN_SRC_COMMON}/conf/FindLibxml2.cmake")
endif(LIBXML2_FOUND)
endif ( )
message(" -> INC : ${LIBXML2_INCLUDE_PATH}")
message(" -> LIB : ${LIBXML2_LIBRARIES}\n")
......@@ -21,9 +21,9 @@ function(gsl_lib)
find_package(GSL REQUIRED)
if (GSL_FOUND)
message( "\n >> GSL found")
else (GSL_FOUND)
else ( )
message( "\n >> GSL not found, modify ${ROBOTRAN_SRC_COMMON}/conf/FindGSL.cmake")
endif(GSL_FOUND)
endif ( )
message(" -> INC : ${GSL_INCLUDE_DIR}")
message(" -> LIB : ${GSL_LIBRARIES}\n")
......@@ -37,9 +37,9 @@ function(sdl_lib)
if (SDL2_FOUND)
include_directories (${SDL2_INCLUDE_PATH})
message( "\n >> SDL 2.0 found")
else (SDL2_FOUND)
else ( )
message( "\n>> SDL 2.0 not found, modify ${ROBOTRAN_SRC_COMMON}/conf/FindSDL2.cmake")
endif (SDL2_FOUND)
endif ( )
message(" -> INC : ${SDL2_INCLUDE_PATH}")
message(" -> LIB : ${SDL2_LIBRARIES}\n")
......@@ -49,9 +49,9 @@ function(sdl_lib)
if (SDL2TTF_FOUND)
include_directories (${SDL2TTF_INCLUDE_PATH})
message( "\n >> SDL 2.0 ttf found")
else (SDL2TTF_FOUND)
else ( )
message( "\n >> SDL 2.0 ttf not found, modify ${ROBOTRAN_SRC_COMMON}/conf/FindSDL2_ttf.cmake")
endif (SDL2TTF_FOUND)
endif ( )
message(" -> INC : ${SDL2TTF_INCLUDE_PATH}")
message(" -> LIB : ${SDL2TTF_LIBRARIES}\n")
......@@ -67,9 +67,9 @@ function(java_lib)
if (JNI_FOUND)
include_directories (${JNI_INCLUDE_PATH})
message( "\n >> JNI found")
else (JNI_FOUND)
else ( )
message( "\n >> JNI not found, modify ${ROBOTRAN_SRC_COMMON}/conf/FindJNI.cmake")
endif (JNI_FOUND)
endif ( )
message(" -> INC : ${JNI_INCLUDE_PATH}")
message(" -> LIB : ${JNI_LIBRARIES}\n")
......@@ -80,9 +80,9 @@ function(java_lib)
# path to some Java 3D files (to print in 'cmake_config.h')
set (J3D_PATH ${J3D_PATH} PARENT_SCOPE)
message( "\n >> Java 3D found")
else (J3D_FOUND)
else ( )
message( "\n >> Java 3D not found, modify ${ROBOTRAN_SRC_COMMON}/conf/FindJ3D.cmake")
endif (J3D_FOUND)
endif ( )
message(" -> PATH : ${J3D_PATH}\n")
......
......@@ -22,7 +22,7 @@ set(CMAKE_BUILD_TYPE Debug)
# for Unix: display all the warnings, except the ones related to /* -- */
if (UNIX)
set(CMAKE_C_FLAGS "-g -Wall -Wno-comment -Wno-unused-variable")
endif (UNIX)
endif ( )
set(ROBOTRAN_DIR_COMMON "${PROJECT_SOURCE_DIR}/../../")
set(ROBOTRAN_SOURCE_DIR ${ROBOTRAN_DIR_COMMON})
......@@ -84,9 +84,9 @@ target_link_libraries (${Executable} ${LIBXML2_LIBRARIES})
if (WIN32)
file(COPY ${ROBOTRAN_SOURCE_DIR}/win64_include_lib/dll/libxml2.dll DESTINATION ${CMAKE_BINARY_DIR}/Debug)
endif (WIN32)
endif ( )
# math external library (for Unix): linkage
if (UNIX)
target_link_libraries (${Executable} m)
endif (UNIX)
endif ( )
......@@ -17,14 +17,15 @@ increment_src(./)
init_include()
set(INCLUDE_DIR ${INCLUDE_DIR} "./" PARENT_SCOPE)
# remove some compilation warnings (This line should be removed once the loading, equil and modal modules are stabilized)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-result")
if(FLAG_SHARED_LIB)
add_library(MBsysC_module SHARED ${SOURCE_FILES} ${INCLUDE_DIR})
target_link_libraries(MBsysC_module MBsysC_struct MBsysC_numerics MBsysC_utilities MBsysC_realtime)
else(FLAG_SHARED_LIB)
else( )
add_library(MBsysC_module STATIC ${SOURCE_FILES} ${INCLUDE_DIR})
endif(FLAG_SHARED_LIB)
endif( )
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment