Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
otb
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
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
David Youssefi
otb
Commits
39623d1a
Commit
39623d1a
authored
16 years ago
by
Emmanuel Christophe
Browse files
Options
Downloads
Patches
Plain Diff
COMP: replace try_run by add_custom_command
parent
0e097c63
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Utilities/otbossim/CMakeLists.txt
+24
-17
24 additions, 17 deletions
Utilities/otbossim/CMakeLists.txt
with
24 additions
and
17 deletions
Utilities/otbossim/CMakeLists.txt
+
24
−
17
View file @
39623d1a
...
@@ -15,7 +15,7 @@ CHECK_INCLUDE_FILE("dbmalloc.h" CMAKE_HAVE_DBMALLOC_H)
...
@@ -15,7 +15,7 @@ CHECK_INCLUDE_FILE("dbmalloc.h" CMAKE_HAVE_DBMALLOC_H)
CHECK_INCLUDE_FILE
(
"malloc.h"
CMAKE_HAVE_MALLOC_H
)
CHECK_INCLUDE_FILE
(
"malloc.h"
CMAKE_HAVE_MALLOC_H
)
CHECK_INCLUDE_FILE
(
"dlfcn.h"
CMAKE_HAVE_DLFCN_H
)
CHECK_INCLUDE_FILE
(
"dlfcn.h"
CMAKE_HAVE_DLFCN_H
)
# itkjpeg headers are not generated and put into the include dir automatically.
# itkjpeg headers are not generated and put into the include dir automatically.
# Therefore we have to do it ourselves.
# Therefore we have to do it ourselves.
IF
(
OTB_USE_EXTERNAL_ITK
)
IF
(
OTB_USE_EXTERNAL_ITK
)
...
@@ -58,24 +58,31 @@ CONFIGURE_FILE(${OTB_SOURCE_DIR}/Utilities/otbossim/include/ossim/ossimConfig.h.
...
@@ -58,24 +58,31 @@ CONFIGURE_FILE(${OTB_SOURCE_DIR}/Utilities/otbossim/include/ossim/ossimConfig.h.
${
OTB_BINARY_DIR
}
/Utilities/otbossim/include/ossim/ossimConfig.h
)
${
OTB_BINARY_DIR
}
/Utilities/otbossim/include/ossim/ossimConfig.h
)
# Run ossim/version-config.cpp taht will generate ossim/ossimVersion.h file nedeed to compile OSSIM
# Run ossim/version-config.cpp taht will generate ossim/ossimVersion.h file nedeed to compile OSSIM
SET
(
INCLUDES_OSSIM_TRY_RUN
"-DINCLUDE_DIRECTORIES:STRING=
${
OTB_BINARY_DIR
}
/Utilities/otbossim/include"
)
# SET(INCLUDES_OSSIM_TRY_RUN "-DINCLUDE_DIRECTORIES:STRING=${OTB_BINARY_DIR}/Utilities/otbossim/include" )
TRY_RUN
(
RUN_RESULT_VAR COMPILE_RESULT_VAR
# TRY_RUN(RUN_RESULT_VAR COMPILE_RESULT_VAR
${
OTB_BINARY_DIR
}
# ${OTB_BINARY_DIR}
${
OTB_SOURCE_DIR
}
/Utilities/otbossim/src/ossim/version-config.cpp
# ${OTB_SOURCE_DIR}/Utilities/otbossim/src/ossim/version-config.cpp
CMAKE_FLAGS
"
${
INCLUDES_OSSIM_TRY_RUN
}
"
# CMAKE_FLAGS "${INCLUDES_OSSIM_TRY_RUN}"
OUTPUT_VARIABLE output
# OUTPUT_VARIABLE output
ARGS
"
${
OTB_BINARY_DIR
}
/Utilities/otbossim/include/ossim/ossimVersion.h"
# ARGS "${OTB_BINARY_DIR}/Utilities/otbossim/include/ossim/ossimVersion.h"
)
# )
add_executable
(
version-config
${
OTB_SOURCE_DIR
}
/Utilities/otbossim/src/ossim/version-config.cpp
)
IF
(
NOT COMPILE_RESULT_VAR
)
add_custom_command
(
MESSAGE
(
FATAL_ERROR
"OSSIM : cannot compile version-config.cpp"
)
OUTPUT
${
OTB_BINARY_DIR
}
/Utilities/otbossim/include/ossim/ossimVersion.h
ENDIF
(
NOT COMPILE_RESULT_VAR
)
DEPENDS version-config
COMMAND version-config
ARGS
"
${
OTB_BINARY_DIR
}
/Utilities/otbossim/include/ossim/ossimVersion.h"
)
# IF(NOT COMPILE_RESULT_VAR)
# MESSAGE(FATAL_ERROR "OSSIM : cannot compile version-config.cpp")
# ENDIF(NOT COMPILE_RESULT_VAR)
# IF(RUN_RESULT_VAR)
# MESSAGE(FATAL_ERROR "OSSIM : cannot create ossimVersion.h file")
# ENDIF(RUN_RESULT_VAR)
IF
(
RUN_RESULT_VAR
)
MESSAGE
(
FATAL_ERROR
"OSSIM : cannot create ossimVersion.h file"
)
ENDIF
(
RUN_RESULT_VAR
)
SUBDIRS
(
include
)
SUBDIRS
(
include
)
# ADDED BY OTB DEVELOPPERS TO AVOID INTENSIVE RECOMPILATION
# ADDED BY OTB DEVELOPPERS TO AVOID INTENSIVE RECOMPILATION
IF
(
NOT OTB_DISABLE_UTILITIES_COMPILATION
)
IF
(
NOT OTB_DISABLE_UTILITIES_COMPILATION
)
...
...
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