Skip to content
Snippets Groups Projects
Commit c20aadd2 authored by Tom Fischer's avatar Tom Fischer
Browse files

Merge branch 'master' of github.com:ufz/ogs

parents e94d5115 9d5f7040
No related branches found
No related tags found
No related merge requests found
# Source files
SET ( Base_Files
binarySearch.h
Configure.h.in
CPUTimeTimer.h
DateTools.h
FileFinder.h
FileTools.h
printList.h
quicksort.h
RunTimeTimer.h
StringTools.h
swap.h
TimeMeasurementBase.h
uniqueListInsert.h
wait.h
binarySearch.cpp
DateTools.cpp
CPUTimeTimer.cpp
RunTimeTimer.cpp
StringTools.cpp
)
SOURCE_GROUP( Base FILES ${Base_Files})
GET_SOURCE_FILES(SOURCES)
# Create the library
ADD_LIBRARY( Base STATIC ${Base_Files})
ADD_LIBRARY( Base STATIC ${SOURCES})
SET_TARGET_PROPERTIES(Base PROPERTIES LINKER_LANGUAGE CXX)
......
......@@ -9,9 +9,11 @@ cmake_minimum_required(VERSION 2.6)
project( OGS-6 )
### CMake includes ###
INCLUDE(scripts/cmake/Functions.cmake)
INCLUDE(scripts/cmake/CMakeSetup.cmake)
INCLUDE(scripts/cmake/CompilerSetup.cmake)
INCLUDE(scripts/cmake/Find.cmake)
INCLUDE(scripts/cmake/ProjectSetup.cmake)
###############
### Options ###
......@@ -22,9 +24,9 @@ IF((CMAKE_COMPILER_IS_GNUCXX OR CMAKE_COMPILER_IS_GNUCC) AND GPROF_PATH)
OPTION(OGS_PROFILE "Enables compiling with flags set for profiling with gprof." OFF)
ENDIF() # GCC AND GPROF_PATH
# Set build directories
SET( EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin )
SET( LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/lib )
######################
### Subdirectories ###
######################
# Add subdirectories with the projects
ADD_SUBDIRECTORY( Base )
......
# Returns the current subdirectory in the sources directory.
MACRO(GET_CURRENT_SOURCE_SUBDIRECTORY CURRENT_SOURCE_SUBDIRECTORY)
STRING(REGEX REPLACE ".*/([^/]*)" "\\1" REGEX_RESULT "${CMAKE_CURRENT_SOURCE_DIR}" )
SET(${CURRENT_SOURCE_SUBDIRECTORY} ${REGEX_RESULT})
ENDMACRO()
# Returns a list of source files (*.h and *.cpp) in SOURCE_FILES and creates a Visual
# Studio folder. A (relative) directory can be passed as second parameter (optional).
MACRO(GET_SOURCE_FILES SOURCE_FILES)
IF(ARGC EQUAL 2)
SET(DIR "${arg2}/")
ELSE()
SET(DIR "")
ENDIF()
# Get all files in the directory
FILE(GLOB GET_SOURCE_FILES_HEADERS ${DIR}*.h)
FILE(GLOB GET_SOURCE_FILES_SOURCES ${DIR}*.cpp)
SET(${SOURCE_FILES} ${GET_SOURCE_FILES_HEADERS} ${GET_SOURCE_FILES_SOURCES})
GET_CURRENT_SOURCE_SUBDIRECTORY(DIRECTORY)
MESSAGE("Curr: ${DIRECTORY}")
SOURCE_GROUP( ${DIRECTORY} FILES ${SOURCE_FILES})
ENDMACRO()
\ No newline at end of file
# Set build directories
SET( EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin )
SET( LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/lib )
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment