[CMake] Beginning to compiling CMake file
CrestChristopher
crestchristopher at gmail.com
Wed Aug 8 20:06:11 EDT 2018
Hi,
From my understanding I must compile with Powershell ?
These variables mentioned in the appveyor file they are environment
variables which are set within cPanel ?
What is the first step I need to do and with what file from the
repository whether in PowerShell or CMake or both ?
Thanks
On 8/3/2018 10:02 AM, Volker Enderlein wrote:
> Hi,
>
> the configuration step of OSL is running this command (via a
> powershell command), $... denotes always variables defined somewhere
> in the appveyor file, $env: denotes environment variables.
>
> cmake ..\.. -G "$GENERATOR"
> -DCMAKE_CONFIGURATION_TYPES="$env:CONFIGURATION"
> -DCMAKE_PREFIX_PATH="$env:OPENIMAGEIOHOME;$DEP_DIR;$BOOST_ROOT;$LLVM_DIR"
> -DCMAKE_INSTALL_PREFIX="$DEP_DIR" -DLLVM_DIRECTORY="$LLVM_DIR"
> -DLLVM_STATIC=ON -DOPENIMAGEIOHOME="$env:OPENIMAGEIOHOME"
> -DBOOST_LIBRARYDIR="$BOOST_LIBRARYDIR"
> -DFLEX_EXECUTABLE="C:\ProgramData\chocolatey\lib\winflexbison\tools\win_flex.exe"
> -DBISON_EXECUTABLE="C:\ProgramData\chocolatey\lib\winflexbison\tools\win_bison.exe"
> -DUSE_QT=OFF -DBUILDSTATIC=OFF -DLINKSTATIC=OFF
>
> The build step is run via this command:
>
> cmake --build . --config $env:CONFIGURATION -- /nologo /verbosity:minimal
>
> So it builds the entire OSL Project.
>
> As the OSL Toy is included in the master it should be built too.
> (According to the documentation of the PR you linked to, you should
> remove "-DUSE_QT=OFF" from the CMake configuration call.) And because
> you are on Windows using a Visual Studio I suppose you can safely
> remove -DLLVM_DIRECTORY="$LLVM_DIR" -DLLVM_STATIC=ON (as you are not
> building with LLVM) and replace -G "$GENERATOR" by -G "Visual Studio
> 14 2015" or -G "Visual Studio 15 2017". "$env:Configuration" ca be
> replaced with "Release" (without the double quotes). Other environment
> variables and variables may need to be replaced by %variable% if you
> build on a non powershell command prompt. This is not tested, so you
> may need to adopt other settings too.
>
> I am not aware of any way to build OSL Toy separately. Maybe you
> should drop Larry Gritz (the committer of the PR) a message asking for
> further guidance as this is not really a CMake issue rather than a
> "How do I compile only subproject Y of X" with CMake.
>
> Cheers Volker
>
> Am 03/08/2018 um 14:43 schrieb CrestChristopher:
>> Hi, I assume that the first link I posted which was a link to OSL Toy
>> within the Open Shading Language repository uses the methods which
>> you mention to compile the file ?
>>
>>> i.e. the top level directory of the github project, you'll se an
>>> appveyor.yml file entry. That is the information for the continuous
>>> integration tool (CI, AppVeyor) they are using to build the project
>>> from scratch. If you look into it, you'll find a before_build and a
>>> build_script section. Both contain calls to CMake either to build
>>> the dependencies (before_build) or the project itself
>>> (build_script). This is a starting point for you how to formulate
>>> your CMake call.
>>
>> With the information within the before_build & build_script section;
>> how do I formulate the CMake call, as to compile ?
>>
>> Thank You.
>>
>>
>> On 8/3/2018 2:48 AM, Volker Enderlein wrote:
>>> If you go to https://github.com/imageworks/OpenShadingLanguage
>>>
>>> i.e. the top level directory of the github project, you'll se an
>>> appveyor.yml file entry. That is the information for the continuous
>>> integration tool (CI, AppVeyor) they are using to build the project
>>> from scratch. If you look into it, you'll find a before_build and a
>>> build_script section. Both contain calls to CMake either to build
>>> the dependencies (before_build) or the project itself
>>> (build_script). This is a starting point for you how to formulate
>>> your CMake call.
>>>
>>> Cheers Volker
>>>
>>> Am 03/08/2018 um 02:40 schrieb CrestChristopher:
>>>> Sorry, what is this information for; and how can it be used within
>>>> the `build_script` section in the appveyor.yml file ?
>>>>
>>>>
>>>> On 8/2/2018 9:30 AM, Volker Enderlein wrote:
>>>>> Please have a look into the appveyor.yml file under section
>>>>> build_script: you see the typical invocation of cmake for this
>>>>> github project.
>>>>>
>>>>> Cheers Volker
>>>>>
>>>>> Am 02/08/2018 um 15:18 schrieb CrestChristopher:
>>>>>> I hope this helps;
>>>>>> https://github.com/imageworks/OpenShadingLanguage/pull/824 ?
>>>>>>
>>>>>>
>>>>>> On 8/1/2018 5:20 PM, Volker Enderlein wrote:
>>>>>>> Am 31.07.2018 um 06:17 schrieb CrestChristopher:
>>>>>>>> Hi, I'm a beginner to CMake and for weeks I've been trying to
>>>>>>>> compile a CMake file which I found on a github repository. All
>>>>>>>> I can say is I have a CMakeLists.txt file but I don't know how
>>>>>>>> to compile and I hope someone can help ?
>>>>>>>>
>>>>>>>> Christopher
>>>>>>>>
>>>>>>> You may want to include information about the name and the link
>>>>>>> to the project repository from Github to get the best possible
>>>>>>> responses. Without that it's just shooting in the dark.
>>>>>>>
>>>>>>> Cheers Volker
>>>>>>>
>>>>>>
>>>>>
>>>>
>>>
>>
>
More information about the CMake
mailing list