Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
LOFAR
Manage
Activity
Members
Labels
Plan
Issues
Wiki
Jira issues
Open Jira
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
RadioObservatory
LOFAR
Commits
b2deb7b7
Commit
b2deb7b7
authored
16 years ago
by
Martin Gels
Browse files
Options
Downloads
Patches
Plain Diff
bug 1005: Updated cmake file(s).
parent
9052d625
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
LCS/CMakeLists.txt
+71
-89
71 additions, 89 deletions
LCS/CMakeLists.txt
with
71 additions
and
89 deletions
LCS/CMakeLists.txt
+
71
−
89
View file @
b2deb7b7
## ------------------------------------------------------------------------------
## Project characteristics
project
(
LCS
)
cmake_minimum_required
(
VERSION 2.
5
)
cmake_minimum_required
(
VERSION 2.
6
)
##-------------------------------------------------------------------------------
## Options
...
...
@@ -14,8 +13,8 @@ option (LCS_BUILD_TESTS "Build test programs?" FALSE)
## ------------------------------------------------------------------------------
## Set CMAKE_MODULE_PATH to load custom CMake modules
if
(
NOT
USG
_ROOT
)
find_path
(
USG
_ROOT cmake/CMakeSettings.cmake
if
(
NOT
LOFAR
_ROOT
)
find_path
(
LOFAR
_ROOT cmake/
modules/
CMakeSettings.cmake
PATHS
${
LCS_SOURCE_DIR
}
${
LCS_SOURCE_DIR
}
/..
...
...
@@ -24,21 +23,12 @@ find_path (USG_ROOT cmake/CMakeSettings.cmake
$ENV{LOFARSOFT}
)
if
(
USG
_ROOT
)
include
(
${
USG
_ROOT
}
/cmake/CMakeSettings.cmake
)
else
(
USG
_ROOT
)
if
(
LOFAR
_ROOT
)
include
(
${
LOFAR
_ROOT
}
/cmake/CMakeSettings.cmake
)
else
(
LOFAR
_ROOT
)
message
(
FATAL_ERROR
"Unable to locate additional CMake scripts!"
)
endif
(
USG_ROOT
)
endif
(
NOT USG_ROOT
)
## ------------------------------------------------------------------------------
## Commonly used configuration files
set
(
LCS_config
${
LCS_BINARY_DIR
}
/lofar_config.h
)
file
(
WRITE
${
LCS_config
}
"/* lofar_config.h -- Generated by CMake. */
\n\n
"
)
include_directories
(
${
LCS_BINARY_DIR
}
)
endif
(
LOFAR_ROOT
)
endif
(
NOT LOFAR_ROOT
)
## ------------------------------------------------------------------------------
## Additional CMake modules
...
...
@@ -56,88 +46,80 @@ enable_testing()
## ------------------------------------------------------------------------------
## Check system libraries
check_include_files
(
sys/socket.h HAVE_SYS_SOCKET_H
)
check_include_files
(
sys/types.h HAVE_SYS_TYPES_H
)
check_include_files
(
unistd.h HAVE_UNISTD_H
)
check_include_files
(
stdarg.h HAVE_STDARG_H
)
check_include_files
(
time.h HAVE_TIME_H
)
check_include_files
(
stdio.h HAVE_STDIO_H
)
check_include_files
(
netinet/in.h HAVE_NETINET_IN_H
)
if
(
HAVE_SYS_TYPES_H
)
check_type_size
(
"uint"
HAVE_UINT
)
if
(
HAVE_UINT
)
add_definitions
(
-DHAVE_UINT
)
endif
(
HAVE_UINT
)
##
check_type_size
(
"long"
HAVE_LONG
)
if
(
HAVE_LONG
)
add_definitions
(
-DHAVE_LONG
)
endif
(
HAVE_LONG
)
##
check_type_size
(
"long long"
HAVE_LONGLONG
)
if
(
HAVE_LONGLONG
)
add_definitions
(
-DHAVE_LONGLONG
)
endif
(
HAVE_LONGLONG
)
##
check_type_size
(
"ushort"
HAVE_USHORT
)
if
(
HAVE_USHORT
)
add_definitions
(
-DHAVE_USHORT
)
endif
(
HAVE_USHORT
)
else
(
HAVE_SYS_TYPES_H
)
message
(
STATUS
"Unable to find sys/types.h"
)
endif
(
HAVE_SYS_TYPES_H
)
## ------------------------------------------------------------------------------
## Search for external libraries
## Boost++
## ------------------------------------------------------------------------------
## Check for required tools
include
(
${
USG_ROOT
}
/cmake/FindBoost.cmake
)
## ------------------------------------------------------------------------------
## Module header files
if
(
BOOST_INCLUDES
)
include_directories
(
${
BOOST_INCLUDES
}
)
add_definitions
(
-DHAVE_BOOST
)
endif
(
BOOST_INCLUDES
)
## casacore
## ------------------------------------------------------------------------------
## Directories to be included in the build
include
(
${
USG_ROOT
}
/cmake/FindCASACORE.cmake
)
## --- Tools ----------------------------------------
if
(
CASACORE_INCLUDES
)
include_directories
(
${
CASACORE_INCLUDES
}
)
add_definitions
(
-DHAVE_AIPSPP
)
endif
(
CASACORE_INCLUDES
)
find_path
(
HAVE_TOOLS CMakeLists.txt
${
LOFAR_SOURCE_DIR
}
/LCS/Tools
)
if
(
HAVE_TOOLS
)
set
(
HAVE_TOOLS TRUE CACHE BOOL
"Have package Tools?"
FORCE
)
add_subdirectory
(
Tools
)
endif
(
HAVE_TOOLS
)
## ------------------------------------------------------------------------------
## Check for required tools
## --- Common ---------------------------------------
find_program
(
bison_bin bison
)
find_program
(
flex_bin flex
)
find_program
(
yacc_bin yacc
)
find_path
(
HAVE_COMMON CMakeLists.txt
${
LOFAR_SOURCE_DIR
}
/LCS/Common
)
if
(
HAVE_COMMON
)
set
(
HAVE_COMMON TRUE CACHE BOOL
"Have package Common?"
FORCE
)
add_subdirectory
(
Common
)
endif
(
HAVE_COMMON
)
## ------------------------------------------------------------------------------
## Module header files
## --- ACC ------------------------------------------
include_directories
(
${
LCS_SOURCE_DIR
}
/Blob/include
${
LCS_SOURCE_DIR
}
/Common/include
${
LCS_SOURCE_DIR
}
/ACC/ALC/include
${
LCS_SOURCE_DIR
}
/ACC/APS/include
${
LCS_SOURCE_DIR
}
/ACC/PLC/include
${
LCS_SOURCE_DIR
}
/AMC/AMCBase/include
${
LCS_SOURCE_DIR
}
/AMC/AMCImpl/include
${
LCS_SOURCE_DIR
}
/Transport/include
)
find_path
(
HAVE_ACC CMakeLists.txt
${
LOFAR_SOURCE_DIR
}
/LCS/ACC
)
if
(
HAVE_ACC
)
set
(
HAVE_ACC TRUE CACHE BOOL
"Have package ACC?"
FORCE
)
add_subdirectory
(
ACC
)
endif
(
HAVE_ACC
)
## ------------------------------------------------------------------------------
## Directories to be included in the build
## --- AMC ------------------------------------------
find_path
(
HAVE_AMC CMakeLists.txt
${
LOFAR_SOURCE_DIR
}
/LCS/AMC
)
if
(
HAVE_AMC
)
set
(
HAVE_AMC TRUE CACHE BOOL
"Have package AMC?"
FORCE
)
add_subdirectory
(
AMC
)
endif
(
HAVE_AMC
)
## --- BLOB -----------------------------------------
find_path
(
HAVE_BLOB CMakeLists.txt
${
LOFAR_SOURCE_DIR
}
/LCS/Blob
)
if
(
HAVE_BLOB
)
set
(
HAVE_BLOB TRUE CACHE BOOL
"Have package Blob?"
FORCE
)
add_subdirectory
(
Blob
)
endif
(
HAVE_BLOB
)
## --- TRANSPORT ------------------------------------
find_path
(
HAVE_TRANSPORT CMakeLists.txt
${
LOFAR_SOURCE_DIR
}
/LCS/Transport
)
if
(
HAVE_TRANSPORT
)
set
(
HAVE_TRANSPORT TRUE CACHE BOOL
"Have package Transport?"
FORCE
)
add_subdirectory
(
Transport
)
endif
(
HAVE_TRANSPORT
)
## --- STREAM ---------------------------------------
find_path
(
HAVE_STREAM CMakeLists.txt
${
LOFAR_SOURCE_DIR
}
/LCS/Stream
)
if
(
HAVE_STREAM
)
set
(
HAVE_STREAM TRUE CACHE BOOL
"Have package Stream?"
FORCE
)
add_subdirectory
(
Stream
)
endif
(
HAVE_STREAM
)
## --- APPLCOMMON -----------------------------------
find_path
(
HAVE_APPLCOMMON CMakeLists.txt
${
LOFAR_SOURCE_DIR
}
/LCS/ApplCommon
)
if
(
HAVE_APPLCOMMON
)
set
(
HAVE_APPLCOMMON TRUE CACHE BOOL
"Have package ApplCommon?"
FORCE
)
add_subdirectory
(
ApplCommon
)
endif
(
HAVE_APPLCOMMON
)
add_subdirectory
(
ACC
)
add_subdirectory
(
AMC
)
add_subdirectory
(
Blob
)
add_subdirectory
(
Common
)
#add_subdirectory (LACE)
#add_subdirectory (Math)
add_subdirectory
(
Tools
)
add_subdirectory
(
Transport
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment