ENH: Fixed premature include of sr_unix.

Now added a dedicated directory to build the executables.
In this way we don't need to impose in all the project,
their requirements of include_directories.
This commit is contained in:
Luis Ibanez 2012-03-25 18:50:21 -04:00
parent 3ef63f8c72
commit 7c395c9a26
3 changed files with 251 additions and 243 deletions

View File

@ -98,7 +98,6 @@ include_directories(
${fis-gtm_BINARY_DIR}/pro/obj
${fis-gtm_BINARY_DIR}/pro/utf8
${fis-gtm_SOURCE_DIR}/sr_port
${fis-gtm_SOURCE_DIR}/sr_unix
)
@ -158,243 +157,5 @@ if(ARCHITECTURE_IS_64_BITS)
endif()
#
# List of architecture dependent libraries
#
if(ARCHITECTURE_IS_32_BITS)
set(ARCHITECTURE_DEPENDENT_LIBRARIES
${ARCHITECTURE_DEPENDENT_LIBRARIES}
fisgtmi386
)
endif()
if(ARCHITECTURE_IS_64_BITS)
set(ARCHITECTURE_DEPENDENT_LIBRARIES
${ARCHITECTURE_DEPENDENT_LIBRARIES}
fisgtmx64
gnpclientportcm
gnpclientport
cmisockettcpportcm
cmisockettcp
gtmportcm
gtmunixcm
ftokunix
frameport
)
endif()
add_executable(mumps
sr_unix/gtm_main.c
)
target_link_libraries(mumps
lkeport
lkeunix
fisgtmproobj
mumpsport
mumpsunix
mupipport
mupipunix
gtmlinux2
fisgtmproobj
${ARCHITECTURE_DEPENDENT_LIBRARIES}
${CURSES_LIBRARIES}
elf
dl
pthread
m
)
add_executable(dse
sr_unix/dse.c
sr_unix/lke_cmd.c
sr_unix/lke_ctrlc_handler.c
)
target_link_libraries(dse
lkeport
lkeunix
mumpsport
mumpsunix
mupipport
mupipunix
dseport
dseunix
gtmlinux2
gtmportcm
cmisockettcpportcm
fisgtmproobj
${ARCHITECTURE_DEPENDENT_LIBRARIES}
${CURSES_LIBRARIES}
elf
dl
pthread
m
)
add_executable(mupip
sr_unix/mupip.c
)
target_link_libraries(mupip
mupipport
mupipunix
lkeport
lkeunix
fisgtmproobj
${ARCHITECTURE_DEPENDENT_LIBRARIES}
mumpsport
mumpsunix
mumpsport
mumpsunix
gtmlinux2
fisgtmproobj
${CURSES_LIBRARIES}
elf
dl
pthread
m
)
add_executable(lke
sr_unix/lke.c
sr_unix/lke_cmd.c
sr_unix/lke_ctrlc_handler.c
)
target_link_libraries(lke
lkeport
lkeunix
mumpsport
mumpsunix
mupipport
mupipunix
${ARCHITECTURE_DEPENDENT_LIBRARIES}
fisgtmproobj
gtmlinux2
${CURSES_LIBRARIES}
elf
dl
pthread
m
)
add_executable(gtm
sr_unix/gtm.c
)
target_link_libraries(gtm
dl
m
)
add_executable(semstat2
sr_unix/semstat2.c
)
target_link_libraries(semstat2
elf
dl
)
add_executable(gtmsecshr
sr_unix/gtmsecshr.c
)
target_link_libraries(gtmsecshr
mumpsport
mumpsunix
fisgtmproobj
${ARCHITECTURE_DEPENDENT_LIBRARIES}
lkeport
lkeunix
gtmlinux2
mupipport
mupipunix
${CURSES_LIBRARIES}
pthread
elf
dl
m
)
add_executable(gtcm_pkdisp
sr_unix_cm/gtcm_pkdisp.c
)
target_link_libraries(gtcm_pkdisp
mumpsport
mumpsunix
fisgtmproobj
${ARCHITECTURE_DEPENDENT_LIBRARIES}
lkeport
lkeunix
gtmlinux2
mupipport
mupipunix
${CURSES_LIBRARIES}
pthread
elf
dl
m
)
add_executable(gtcm_play
sr_unix_cm/gtcm_play.c
)
target_link_libraries(gtcm_play
mumpsport
mumpsunix
mupipport
mupipunix
stubunix
gtmlinux2
lkeport
lkeunix
fisgtmproobj
${ARCHITECTURE_DEPENDENT_LIBRARIES}
${CURSES_LIBRARIES}
pthread
elf
dl
m
)
add_executable(gtcm_shmclean
sr_unix_cm/gtcm_shmclean.c
)
target_link_libraries(gtcm_shmclean
mumpsport
mumpsunix
mupipport
mupipunix
gtmlinux2
stubunix
lkeport
lkeunix
fisgtmproobj
${ARCHITECTURE_DEPENDENT_LIBRARIES}
${CURSES_LIBRARIES}
pthread
elf
dl
m
)
add_subdirectory(executables)

246
executables/CMakeLists.txt Normal file
View File

@ -0,0 +1,246 @@
include_directories(
${fis-gtm_SOURCE_DIR}/sr_unix
)
#
# List of architecture dependent libraries
#
if(ARCHITECTURE_IS_32_BITS)
set(ARCHITECTURE_DEPENDENT_LIBRARIES
${ARCHITECTURE_DEPENDENT_LIBRARIES}
fisgtmi386
)
endif()
if(ARCHITECTURE_IS_64_BITS)
set(ARCHITECTURE_DEPENDENT_LIBRARIES
${ARCHITECTURE_DEPENDENT_LIBRARIES}
fisgtmx64
gnpclientportcm
gnpclientport
cmisockettcpportcm
cmisockettcp
gtmportcm
gtmunixcm
ftokunix
frameport
)
endif()
add_executable(mumps
../sr_unix/gtm_main.c
)
target_link_libraries(mumps
lkeport
lkeunix
fisgtmproobj
mumpsport
mumpsunix
mupipport
mupipunix
gtmlinux2
fisgtmproobj
${ARCHITECTURE_DEPENDENT_LIBRARIES}
${CURSES_LIBRARIES}
elf
dl
pthread
m
)
add_executable(dse
../sr_unix/dse.c
../sr_unix/lke_cmd.c
../sr_unix/lke_ctrlc_handler.c
)
target_link_libraries(dse
lkeport
lkeunix
mumpsport
mumpsunix
mupipport
mupipunix
dseport
dseunix
gtmlinux2
gtmportcm
cmisockettcpportcm
fisgtmproobj
${ARCHITECTURE_DEPENDENT_LIBRARIES}
${CURSES_LIBRARIES}
elf
dl
pthread
m
)
add_executable(mupip
../sr_unix/mupip.c
)
target_link_libraries(mupip
mupipport
mupipunix
lkeport
lkeunix
fisgtmproobj
${ARCHITECTURE_DEPENDENT_LIBRARIES}
mumpsport
mumpsunix
mumpsport
mumpsunix
gtmlinux2
fisgtmproobj
${CURSES_LIBRARIES}
elf
dl
pthread
m
)
add_executable(lke
../sr_unix/lke.c
../sr_unix/lke_cmd.c
../sr_unix/lke_ctrlc_handler.c
)
target_link_libraries(lke
lkeport
lkeunix
mumpsport
mumpsunix
mupipport
mupipunix
${ARCHITECTURE_DEPENDENT_LIBRARIES}
fisgtmproobj
gtmlinux2
${CURSES_LIBRARIES}
elf
dl
pthread
m
)
add_executable(gtm
../sr_unix/gtm.c
)
target_link_libraries(gtm
dl
m
)
add_executable(semstat2
../sr_unix/semstat2.c
)
target_link_libraries(semstat2
elf
dl
)
add_executable(gtmsecshr
../sr_unix/gtmsecshr.c
)
target_link_libraries(gtmsecshr
mumpsport
mumpsunix
fisgtmproobj
${ARCHITECTURE_DEPENDENT_LIBRARIES}
lkeport
lkeunix
gtmlinux2
mupipport
mupipunix
${CURSES_LIBRARIES}
pthread
elf
dl
m
)
add_executable(gtcm_pkdisp
../sr_unix_cm/gtcm_pkdisp.c
)
target_link_libraries(gtcm_pkdisp
mumpsport
mumpsunix
fisgtmproobj
${ARCHITECTURE_DEPENDENT_LIBRARIES}
lkeport
lkeunix
gtmlinux2
mupipport
mupipunix
${CURSES_LIBRARIES}
pthread
elf
dl
m
)
add_executable(gtcm_play
../sr_unix_cm/gtcm_play.c
)
target_link_libraries(gtcm_play
mumpsport
mumpsunix
mupipport
mupipunix
stubunix
gtmlinux2
lkeport
lkeunix
fisgtmproobj
${ARCHITECTURE_DEPENDENT_LIBRARIES}
${CURSES_LIBRARIES}
pthread
elf
dl
m
)
add_executable(gtcm_shmclean
../sr_unix_cm/gtcm_shmclean.c
)
target_link_libraries(gtcm_shmclean
mumpsport
mumpsunix
mupipport
mupipunix
gtmlinux2
stubunix
lkeport
lkeunix
fisgtmproobj
${ARCHITECTURE_DEPENDENT_LIBRARIES}
${CURSES_LIBRARIES}
pthread
elf
dl
m
)

View File

@ -2,6 +2,7 @@ if(ARCHITECTURE_IS_32_BITS)
include_directories(
${fis-gtm_SOURCE_DIR}/sr_i386
${fis-gtm_SOURCE_DIR}/sr_unix_nsb
${fis-gtm_SOURCE_DIR}/sr_unix
)
endif()
@ -9,12 +10,12 @@ endif()
if(ARCHITECTURE_IS_64_BITS)
include_directories(
${fis-gtm_SOURCE_DIR}/sr_x86_64
${fis-gtm_SOURCE_DIR}/sr_unix
)
endif()
include_directories(
${fis-gtm_SOURCE_DIR}/sr_unix
${fis-gtm_SOURCE_DIR}/sr_linux
${fis-gtm_SOURCE_DIR}/pro
${fis-gtm_SOURCE_DIR}/pro/obj
@ -715,7 +716,6 @@ set(GTM_MUMPS_PORT_SRC_C
m_zcontinue.c
m_zdeallocate.c
m_zedit.c
m_zgoto.c
m_zhalt.c
m_zhelp.c
m_zinvcmd.c
@ -1305,6 +1305,7 @@ set(GTM_MUMPS_PORT_SRC_C
ztrap_save_ctxt.c
zwr2format.c
zyerror_init.c
op_labaddr.c
)
#
@ -1611,13 +1612,13 @@ if(ARCHITECTURE_IS_64_BITS)
bx_boolop.c
emit_code.c
job_addr.c
op_labaddr.c
op_zgoto.c
code_gen.c
urx_resolve.c
shrink_trips.c
zlput_rname.c
mu_gv_stack_init.c
m_zgoto.c
)
endif()