[CMake] 2.4.7 TarTest test failure on Tru64 UNIX 5.1
Albert Chin
cmake at mlists.thewrittenword.com
Thu Sep 20 19:47:46 EDT 2007
On Thu, Sep 20, 2007 at 06:08:51PM -0500, Albert Chin wrote:
> On Thu, Sep 20, 2007 at 05:56:43PM -0500, Albert Chin wrote:
> > [ snip snip ... ]
> >
> > The problem is that dirname("tar_dir/") == NULL. However, with
> > -D_XOPEN_SOURCE_EXTENDED, then dirname("tar_dir/") works. So, what
> > should we do? Is it possible to build Utilities/cmtar/util.c with
> > -D_XOPEN_SOURCE_EXTENDED on Tru64 UNIX only? I know I can do this for
> > _every_ file under Utilities/cmtar but want to restrict it only to
> > Utilities/cmtar/util.c.
>
> Ugh. Figured this out but building all of Utilities/cmtar/extract.c
> with -D_XOPEN_SOURCE_EXTENDED gives an unresolved reference to
> makedev().
Ok, the attached works.
--
albert chin (china at thewrittenword.com)
-------------- next part --------------
Index: Utilities/cmtar/CMakeLists.txt
===================================================================
--- Utilities/cmtar/CMakeLists.txt.orig 2007-09-19 22:16:15.971746127 +0000
+++ Utilities/cmtar/CMakeLists.txt 2007-09-20 23:12:23.369028455 +0000
@@ -16,6 +16,13 @@
SET(_ALL_SOURCE 1)
ENDIF(${CMAKE_SYSTEM_NAME} MATCHES AIX)
+# dirname(3) needs -D_XOPEN_SOURCE_EXTENDED on Tru64 UNIX so
+# dirname("<dir>/") returns ".", not NULL
+IF(CMAKE_SYSTEM MATCHES "OSF1-V.*")
+ SET_SOURCE_FILES_PROPERTIES(extract.c PROPERTIES
+ COMPILE_FLAGS "-D_XOPEN_SOURCE_EXTENDED -D_OSF_SOURCE")
+ENDIF(CMAKE_SYSTEM MATCHES "OSF1-V.*")
+
# Include all the necessary files for macros
#SET(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/CMake")
# Include all the necessary files for macros
More information about the CMake
mailing list