|
|
|
|
|
|
| |
| |
|
|
From: Le Forgeron
Subject: Re: Interested in CMake support (build system, IDE integration)
Date: 14 Nov 2013 12:10:12
Message: <528503f4$1@news.povray.org>
|
|
|
| |
| |
|
|
Le 14/11/2013 17:19, clipka nous fit lire :
> clang hasn't been tested yet as far as I know.
Well, not officially, but I did build with clang 3.2 and 3.3 (povray 3.7RC7)
Build details at
> http://wiki.povray.org/content/User:Le_Forgeron/vault/Compilation
So far, for my cpu, icpc is best. clang 3.3 improved a bit when compared
to 3.2, but still not to the level of gcc when HT is in the figure (but
clang is better than gcc when there is no HT)
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
James Holsenback <nom### [at] nonecom> wrote:
> On 11/14/2013 07:51 AM, ideasman42 wrote:
> <snip>
> > - autoconf/automake (not sure it ever worked well)
>
> well I'll watch you efforts with interest ... I'd like to see the
> unix/linux build process cleaned up. I tired several times but was never
> able to spend enough time with it to make any headway.
Heres the initial effort to support CMake.
Eclipse project file:
- http://www.graphicall.org/ftp/ideasman42/linux_eclipse_povray.png
Clang3.3 output:
- http://www.graphicall.org/ftp/ideasman42/linux_clang33_povray.html
Currently its a single CMakeLists.txt file, which should be broken up, and
theres TODO's listed at the top of the file.
Git repo:
- https://github.com/ideasman42/povray-cmake
Post a reply to this message
|
|
| |
| |
|
|
From: Nicolas Alvarez
Subject: Re: Interested in CMake support (build system, IDE integration)
Date: 7 Mar 2014 16:40:21
Message: <531a3cc5$1@news.povray.org>
|
|
|
| |
| |
|
|
ideasman42 wrote:
> James Holsenback <nom### [at] nonecom> wrote:
>> On 11/14/2013 07:51 AM, ideasman42 wrote:
>> <snip>
>> > - autoconf/automake (not sure it ever worked well)
>>
>> well I'll watch you efforts with interest ... I'd like to see the
>> unix/linux build process cleaned up. I tired several times but was never
>> able to spend enough time with it to make any headway.
>
> Heres the initial effort to support CMake.
>
> Currently its a single CMakeLists.txt file, which should be broken up, and
> theres TODO's listed at the top of the file.
>
> Git repo:
> - https://github.com/ideasman42/povray-cmake
I'm looking into writing a CMake build system too. I'm not really using your
effort as a base, but considering your list of TODOs it would need almost a
rewrite anyway. For example, I'm starting straight away with an explicit
list of sources instead of globs :)
Post a reply to this message
|
|
| |
| |
|
|
From: Le Forgeron
Subject: Re: Interested in CMake support (build system, IDE integration)
Date: 8 Mar 2014 03:26:00
Message: <531ad418$1@news.povray.org>
|
|
|
| |
| |
|
|
Le 07/03/2014 22:40, Nicolas Alvarez nous fit lire :
> ideasman42 wrote:
>> Heres the initial effort to support CMake.
>>
>> Currently its a single CMakeLists.txt file, which should be broken up, and
>> theres TODO's listed at the top of the file.
>>
>> Git repo:
>> - https://github.com/ideasman42/povray-cmake
>
> I'm looking into writing a CMake build system too. I'm not really using your
> effort as a base, but considering your list of TODOs it would need almost a
> rewrite anyway. For example, I'm starting straight away with an explicit
> list of sources instead of globs :)
>
So, whenever adding a new source file, you also have to know about that
list ? What about the dependencies ? Do you use a Chinese army approach ?
Post a reply to this message
|
|
| |
| |
|
|
From: Nicolas Alvarez
Subject: Re: Interested in CMake support (build system, IDE integration)
Date: 8 Mar 2014 14:09:10
Message: <531b6ad6@news.povray.org>
|
|
|
| |
| |
|
|
Le_Forgeron wrote:
> Le 07/03/2014 22:40, Nicolas Alvarez nous fit lire :
>> I'm looking into writing a CMake build system too. I'm not really using
>> your effort as a base, but considering your list of TODOs it would need
>> almost a rewrite anyway. For example, I'm starting straight away with an
>> explicit list of sources instead of globs :)
>>
> So, whenever adding a new source file, you also have to know about that
> list ? What about the dependencies ? Do you use a Chinese army approach ?
When you add a new source file, you need to modify the build system. I don't
see how that's surprising.
Assuming you mean #include dependencies, they are are handled automatically.
The simplest CMake script is:
add_executable(myprogram one.cpp two.cpp three.cpp)
You don't need to say what header files they depend on.
Post a reply to this message
|
|
| |
| |
|
|
From: clipka
Subject: Re: Interested in CMake support (build system, IDE integration)
Date: 24 May 2014 13:57:09
Message: <5380dd75$1@news.povray.org>
|
|
|
| |
| |
|
|
Am 08.03.2014 20:09, schrieb Nicolas Alvarez:
> Le_Forgeron wrote:
>> Le 07/03/2014 22:40, Nicolas Alvarez nous fit lire :
>>> I'm looking into writing a CMake build system too. I'm not really using
>>> your effort as a base, but considering your list of TODOs it would need
>>> almost a rewrite anyway. For example, I'm starting straight away with an
>>> explicit list of sources instead of globs :)
>>>
>> So, whenever adding a new source file, you also have to know about that
>> list ? What about the dependencies ? Do you use a Chinese army approach ?
>
> When you add a new source file, you need to modify the build system. I don't
> see how that's surprising.
FYI, the current Automake build system does /not/ need any modifications
upon addition of a new source file. It simply builds all source files in
a given set of directories.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
In his project, I want to use the Povray. I can not study very long
configuration files.
I decided to use CMake.
To build the project in Linux, I wrote a single file CMakeLists.txt
cmake_minimum_required(VERSION 2.8)
project(povanim)
set(CMAKE_CXX_FLAGS "-std=c++11 -pipe -Wno-multichar -Wno-write-strings
-fno-enforce-eh-specs -Wno-non-template-friend -s -O3 -ffast-math -march=native
-pthread")
set( SOURCE_ROOT source )
set( SOURCE_BASKEND source/backend )
set( SOURCE_BASKEND_BOUNDING source/backend/bounding )
set( SOURCE_BASKEND_CONTROL source/backend/control )
set( SOURCE_BASKEND_LIGHTING source/backend/lighting )
set( SOURCE_BASKEND_RENDER source/backend/render )
set( SOURCE_BASKEND_SCENE source/backend/scene )
set( SOURCE_BASKEND_SUPPORT source/backend/support )
set( SOURCE_BASE source/base )
set( SOURCE_BASE_ANIMATION source/base/animation )
set( SOURCE_BASE_FONT source/base/font )
set( SOURCE_BASE_IMAGE source/base/image )
set( SOURCE_CORE source/core )
set( SOURCE_CORE_BOUNDING source/core/bounding )
set( SOURCE_CORE_COLOUR source/core/colour )
set( SOURCE_CORE_LIGHTING source/core/lighting )
set( SOURCE_CORE_MATERIAL source/core/material )
set( SOURCE_CORE_MATH source/core/math )
set( SOURCE_CORE_RENDER source/core/render )
set( SOURCE_CORE_SCENE source/core/scene )
set( SOURCE_CORE_SHAPE source/core/shape )
set( SOURCE_CORE_SUPPORT source/core/support )
set( SOURCE_FRONTEND source/frontend )
set( SOURCE_PARSER source/parser )
set( SOURCE_POVMS source/povms )
set( SOURCE_VM source/vm )
set( SOURCE_UNIX unix )
set( SOURCE_PLATFORM_UNIX platform/unix )
set( SOURCE_PLATFORM_X86 platform/x86)
set( SOURCE_VFE vfe )
set( SOURCE_VFE_UNIX vfe/unix)
aux_source_directory( ${SOURCE_ROOT} SOURCEROOT )
aux_source_directory( ${SOURCE_BASKEND} SOURCEBASKEND )
aux_source_directory( ${SOURCE_BASKEND_BOUNDING} SOURCEBASKENDBOUNDING )
aux_source_directory( ${SOURCE_BASKEND_CONTROL} SOURCEBASKENDCONTROL )
aux_source_directory( ${SOURCE_BASKEND_LIGHTING} SOURCEBASKENDLIGHTING )
aux_source_directory( ${SOURCE_BASKEND_RENDER} SOURCEBASKENDRENDER )
aux_source_directory( ${SOURCE_BASKEND_SCENE} SOURCEBASKENDSCENE )
aux_source_directory( ${SOURCE_BASKEND_SUPPORT} SOURCEBASKENDSUPPORT )
aux_source_directory( ${SOURCE_BASE} SOURCEBASE )
aux_source_directory( ${SOURCE_BASE_ANIMATION} SOURCEBASEANIMATION )
aux_source_directory( ${SOURCE_BASE_FONT} SOURCEBASEFONT )
aux_source_directory( ${SOURCE_BASE_IMAGE} SOURCEBASEIMAGE )
aux_source_directory( ${SOURCE_CORE} SOURCECORE )
aux_source_directory( ${SOURCE_CORE_BOUNDING} SOURCECOREBOUNDING )
aux_source_directory( ${SOURCE_CORE_COLOUR} SOURCECORECOLOUR )
aux_source_directory( ${SOURCE_CORE_LIGHTING} SOURCECORELIGHTING )
aux_source_directory( ${SOURCE_CORE_MATERIAL} SOURCECOREMATERIAL )
aux_source_directory( ${SOURCE_CORE_MATH} SOURCECOREMATH )
aux_source_directory( ${SOURCE_CORE_RENDER} SOURCECORERENDER )
aux_source_directory( ${SOURCE_CORE_SCENE} SOURCECORESCENE )
aux_source_directory( ${SOURCE_CORE_SHAPE} SOURCECORESHAPE )
aux_source_directory( ${SOURCE_CORE_SUPPORT} SOURCECORESUPPORT )
aux_source_directory( ${SOURCE_FRONTEND} SOURCEFRONTEND )
aux_source_directory( ${SOURCE_PARSER} SOURCEPARSER )
aux_source_directory( ${SOURCE_POVMS} SOURCEPOVMS )
aux_source_directory( ${SOURCE_VM} SOURCEVM )
aux_source_directory( ${SOURCE_UNIX} SOURCEUNIX )
aux_source_directory( ${SOURCE_PLATFORM_UNIX} SOURCEPLATFORMUNIX )
aux_source_directory( ${SOURCE_PLATFORM_X86} SOURCEPLATFORMX86 )
aux_source_directory( ${SOURCE_VFE} SOURCEVFE )
aux_source_directory( ${SOURCE_VFE_UNIX} SOURCEVFEUNIX )
find_package( JPEG REQUIRED)
find_package( PNG REQUIRED)
find_package( PkgConfig REQUIRED)
pkg_search_module( SDL REQUIRED sdl)
set( UNIX_POVCONFIG_INCLUDE_DIR unix/povconfig)
include_directories( ${SOURCE_ROOT}
${SOURCE_BASKEND}
${SOURCE_BASE}
${SOURCE_CORE}
${SOURCE_FRONTEND}
${SOURCE_PARSER}
${SOURCE_POVMS}
${SOURCE_VM}
${SOURCE_UNIX}
${UNIX_POVCONFIG_INCLUDE_DIR}
${SOURCE_PLATFORM_UNIX}
${SOURCE_PLATFORM_X86}
${SOURCE_VFE}
${SOURCE_VFE_UNIX}
${SDL_INCLUDE_DIRS}
${JPEG_INCLUDE_DIRS}
${PNG_INCLUDE_DIRS}
)
add_executable( ${PROJECT_NAME}
${SOURCEROOT}
${SOURCEBASKEND}
${SOURCEBASKENDBOUNDING}
${SOURCEBASKENDCONTROL}
${SOURCEBASKENDLIGHTING}
${SOURCEBASKENDRENDER}
${SOURCEBASKENDSCENE}
${SOURCEBASKENDSUPPORT}
${SOURCEBASE}
${SOURCEBASEANIMATION}
${SOURCEBASEFONT}
${SOURCEBASEIMAGE}
${SOURCECORE}
${SOURCECOREBOUNDING}
${SOURCECORECOLOUR}
${SOURCECORELIGHTING}
${SOURCECOREMATERIAL}
${SOURCECOREMATH}
${SOURCECORERENDER}
${SOURCECORESCENE}
${SOURCECORESHAPE}
${SOURCECORESUPPORT}
${SOURCEFRONTEND}
${SOURCEPARSER}
${SOURCEPOVMS}
${SOURCEVM}
${SOURCEUNIX}
${SOURCEPLATFORMUNIX}
${SOURCEPLATFORMX86}
${SOURCEVFE}
${SOURCEVFEUNIX}
)
target_link_libraries( ${PROJECT_NAME}
${SDL_LIBRARIES}
${JPEG_LIBRARIES}
)
Not all external library I added, but JPEG FOUND
leonid@lanucomp ~/workspace/programming/povray_animator/povray $ LC_ALL=C make
Scanning dependencies of target povanim
[ 0%] Building CXX object CMakeFiles/povanim.dir/source/pov_mem.cpp.o
[ 1%] Building CXX object CMakeFiles/povanim.dir/source/povmain.cpp.o
[ 1%] Building CXX object CMakeFiles/povanim.dir/source/backend/povray.cpp.o
/home/leonid/workspace/programming/povray_animator/povray-master/source/backend/povray.cpp:69:30:
fatal error: jversion.h: No such file or directory
#include <jversion.h>
^
compilation terminated.
CMakeFiles/povanim.dir/build.make:110: recipe for target
'CMakeFiles/povanim.dir/source/backend/povray.cpp.o' failed
make[2]: *** [CMakeFiles/povanim.dir/source/backend/povray.cpp.o] Error 1
CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/povanim.dir/all' failed
make[1]: *** [CMakeFiles/povanim.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2
leonid@lanucomp ~/workspace/programming/povray_animator/povray $
In file povray.cpp:
#ifndef LIBJPEG_MISSING
#include <jversion.h>
#endif
Povray does not use an external library libjpeg????
jpeg-devel package has only these files:
/usr/include/jconfig.h
/usr/include/jerror.h
/usr/include/jmorecfg.h
/usr/include/jpegint.h
/usr/include/jpeglib.h
/usr/include/turbojpeg.h
/usr/lib64/libjpeg.so
/usr/lib64/libturbojpeg.so
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
All very good. :)
leonid@lanucomp ~/workspace/programming/povray_animator/povray $ LC_ALL=C make
-j4
Scanning dependencies of target povray
[ 0%] Building CXX object CMakeFiles/povanim.dir/source/pov_mem.cpp.o
.....
.....
[ 99%] Building CXX object CMakeFiles/povanim.dir/vfe/unix/vfeplatform.cpp.o
[100%] Linking CXX executable povray
[100%] Built target povray
leonid@lanucomp ~/workspace/programming/povray_animator/povray $
Post a reply to this message
|
|
| |
| |
|
|
From: clipka
Subject: Re: Interested in CMake support (build system, IDE integration)
Date: 9 Oct 2016 14:56:03
Message: <57fa92c3$1@news.povray.org>
|
|
|
| |
| |
|
|
Am 09.10.2016 um 11:57 schrieb LanuHum:
> To build the project in Linux, I wrote a single file CMakeLists.txt
...
> set( SOURCE_ROOT source )
> set( SOURCE_BASKEND source/backend )
> set( SOURCE_BASKEND_BOUNDING source/backend/bounding )
> set( SOURCE_BASKEND_CONTROL source/backend/control )
> set( SOURCE_BASKEND_LIGHTING source/backend/lighting )
> set( SOURCE_BASKEND_RENDER source/backend/render )
> set( SOURCE_BASKEND_SCENE source/backend/scene )
> set( SOURCE_BASKEND_SUPPORT source/backend/support )
...
Isn't that overly verbose? Can't CMake build the contents of an entire
directory tree recursively?
(I guess for your own project you're probably ok with this for now, but
I'm also interested in exploring the potential of CMake for official
POV-Ray, so since you're toying around with CMake anyway, I'd be
grateful if you could investigate a bit further in that direction.)
> fatal error: jversion.h: No such file or directory
> #include <jversion.h>
...
> Povray does not use an external library libjpeg????
> jpeg-devel package has only these files:
> /usr/include/jconfig.h
> /usr/include/jerror.h
> /usr/include/jmorecfg.h
> /usr/include/jpegint.h
> /usr/include/jpeglib.h
> /usr/include/turbojpeg.h
> /usr/lib64/libjpeg.so
> /usr/lib64/libturbojpeg.so
Historically, POV-Ray has been using the contents of `jversion.h` to
determine the version of libjpeg it reports to the end user in the list
of library copyright notices.
This works fine with the Windows version, since it is linked to the
version of libjpeg we're distributing in source code format along with
the POV-Ray for Windows source code; but as you have noticed correctly,
the file is typically unavailable for Unix builds as our Unix build
process nowadays always relies on an external libjpeg (disabling JPEG if
such an external library is unavailable).
In our automake-based Unix build process, this has been worked around by
faking the file, with information obtained by the automake tools via
other means.
I had never investigated this before, but now that I've looked at it I
consider it a bug, or at least a flaw that should (and can) be fixed. I
suspect it might be some artifact from the history of libjpeg. After
all, POV-Ray is in some sense 5 years older than libjpeg, and there may
have been times when `jversion.h` used to be the only file from which
version information could be obtained.
All versions of libjpeg that POV-Ray is still compatible with appear to
provide version information in `jpeglib.h`, and I've just made sure
that's the source future versions of POV-Ray will get their version
information from.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |
| |
|
|
clipka <ano### [at] anonymousorg> wrote:
> Am 09.10.2016 um 11:57 schrieb LanuHum:
>
> > To build the project in Linux, I wrote a single file CMakeLists.txt
> ...
>
> > set( SOURCE_ROOT source )
> > set( SOURCE_BASKEND source/backend )
> > set( SOURCE_BASKEND_BOUNDING source/backend/bounding )
> > set( SOURCE_BASKEND_CONTROL source/backend/control )
> > set( SOURCE_BASKEND_LIGHTING source/backend/lighting )
> > set( SOURCE_BASKEND_RENDER source/backend/render )
> > set( SOURCE_BASKEND_SCENE source/backend/scene )
> > set( SOURCE_BASKEND_SUPPORT source/backend/support )
> ...
> Isn't that overly verbose? Can't CMake build the contents of an entire
> directory tree recursively?
>
> (I guess for your own project you're probably ok with this for now, but
> I'm also interested in exploring the potential of CMake for official
> POV-Ray, so since you're toying around with CMake anyway, I'd be
> grateful if you could investigate a bit further in that direction.)
>
My problem - poor understanding of English.
No information in Russian.
Russian-speaking programmers write in English.
I hardly found aux_source_directory. :)))))
Usually written CMakeLists.txt for each directory.
But I do not think a large file.
This is much less than: configure.in, configure.ac, makefile.in, prebuild.sh,
bootstrap, makefile and so on.
Yes, I got ready config.h and the source code has disabled some functions.
I need to understand more.
Post a reply to this message
|
|
| |
| |
|
|
|
|
| |